Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   riastradh
Date:           Sun Apr 13 23:45:10 UTC 2025

Modified Files:
        src/lib/libc/arch/hppa/gen: __longjmp14.c
        src/tests/lib/libc/setjmp: t_sigstack.c

Log Message:
hppa 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.

Tested under qemu with:

atf-run /usr/tests/lib/libc/setjmp | atf-report
atf-run /usr/tests/lib/libpthread/t_siglongjmp | atf-report

PR lib/57946: longjmp fails to restore stack first before restoring
signal mask on most architectures


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/hppa/gen/__longjmp14.c
cvs rdiff -u -r1.12 -r1.13 src/tests/lib/libc/setjmp/t_sigstack.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index