Skip to content

Make sigsetjmp() an alias of setjmp() - #159

Open
rosenrost wants to merge 1 commit into
freemint:masterfrom
rosenrost:fix/make-sigsetjmp-an-alias-of-setjmp
Open

rosenrost wants to merge 1 commit into
freemint:masterfrom
rosenrost:fix/make-sigsetjmp-an-alias-of-setjmp

Conversation

@rosenrost

Copy link
Copy Markdown
Contributor

sigsetjmp() called setjmp() as a separate function, so setjmp() saved the stack pointer and return address of sigsetjmp() instead of its caller. A later longjmp() then returned into the stack frame of sigsetjmp(), which no longer existed. It only worked if the compiler happened to turn the call into a jump.

sigsetjmp() called setjmp() as a separate function, so setjmp() saved
the stack pointer and return address of sigsetjmp() instead of its
caller. A later longjmp() then returned into the stack frame of
sigsetjmp(), which no longer existed. It only worked if the compiler
happened to turn the call into a jump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant