[libc-commits] [libc] [libc][arm] implement setjmp/longjmp (PR #93220)

Roland McGrath via libc-commits libc-commits at lists.llvm.org
Thu May 23 10:50:32 PDT 2024


https://github.com/frobtech commented:

This can be addressed separately later, but I think we need to rethink the approach to setjmp/longjmp in libc.  In particular, I think implementations like this (and the `jmp_buf` ABI) cannot be universal per machine.  This is a great implementation for bare metal, but not necessarily correct or sufficient for any given operating system.  For POSIX systems, there's the issue of stack vs signal mask atomicity in (sig)longjmp.  For various OS ABIs, there are other ABI elements to be concerned with, like shadow-call-stack or safestack ABIs.  For various contexts there are additional concerns like pointer mangling.  For various more complete ABIs, there are non-integer registers that need to be considered. 

https://github.com/llvm/llvm-project/pull/93220


More information about the libc-commits mailing list