CTSRD-CHERI/cheribsd

makecontext / swapcontext faults

bacam opened this issue · 0 comments

bacam commented

Using the deprecated user context handling interface can result in faults because makecontext puts regular functions pointers into the context as a future ELR value for swapcontext to return to, but they're sealed and may have the bottom bit set for C64, so when swapcontext returns to user mode it immediately faults. It might not be worth fixing, however, because it's deprecated and little used.

(For example, I saw it while trying the boost context library, and there's a better way to make that work.)