Home | History | Annotate | Download | only in gen
History log of /src/lib/libc/arch/sparc64/gen/longjmp.c
RevisionDateAuthorComments
 1.8  24-Apr-2025  riastradh sparc, sparc64 longjmp: Use _UC_SIGMASK to restore signal mask.

This way, restoring the signal mask and restoring the stack pointer
happen atomically with respect to signal handler calls, whereas using
sigprocmask would restore the signal mask _before_ the stack pointer,
breaking sigaltstack.

The motivation for using sigprocmask first and then setcontext later,
rather than _UC_SIGMASK in setcontext, was to get SA-based libpthead
sigprocmask interposition. But that's long gone and unlikely to come
back.

PR lib/57946: longjmp fails to restore stack first before restoring
signal mask on most architectures
 1.7  17-Mar-2012  martin delint
 1.6  30-Apr-2011  martin branches: 1.6.4;
Fix previous: the way we calculate, we need to test the size of sigjmp_buf
 1.5  30-Apr-2011  martin Add another compile time assert: catch overflows of jmp_buf
 1.4  30-Apr-2011  martin Rearange jmp_buf content again: storing the sigsetjmp() save_mask midway
inside the environment is not a good idea, we may overwrite it when
fetching other details of the sigjmp environment.
Instead move it to the very end again.
Do not bother to save volatile (caller saved) global registers.
Fixes PR port-sparc64/44918.
 1.3  27-Apr-2011  martin Fix offsets used in the assembly code to save global registers into a
jmp_buf, add a compile time assert to catch this kind of divergence
in the C code.
Move the fixed "%npc = %pc + 4" computation to longjmp, this frees
the sigcontext sc_npc value. Use this space to save the savemask
for siglongjmp (we have run out of space behind the globals).
Fixes the tests/lib/libc/setjmp/t_threadjmp tests, and also hopefully
fixes PR port-sparc64/44902.
 1.2  28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1  16-Oct-2005  christos branches: 1.1.18;
rename the files in gen like we did for i386.
 1.1.18.1  18-May-2008  yamt sync with head.
 1.2.8.2  28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1  28-Apr-2008  martin file longjmp.c was added on branch christos-time_t on 2008-04-28 20:22:58 +0000
 1.6.4.1  17-Apr-2012  yamt sync with head

RSS XML Feed