aboutsummaryrefslogtreecommitdiff
path: root/stdlib/tst-setcontext10.c
AgeCommit message (Collapse)AuthorFilesLines
2025-01-01Update copyright dates with scripts/update-copyrightsPaul Eggert1-1/+1
2024-12-23include/sys/cdefs.h: Add __attribute_optimization_barrier__Adhemerval Zanella1-3/+3
Add __attribute_optimization_barrier__ to disable inlining and cloning on a function. For Clang, expand it to __attribute__ ((optnone)) Otherwise, expand it to __attribute__ ((noinline, clone)) Co-Authored-By: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2024-01-01Update copyright dates with scripts/update-copyrightsPaul Eggert1-1/+1
2023-12-19tst-setcontext10.c: Undef _FORTIFY_SOURCEH.J. Lu1-0/+9
When _FORTIFY_SOURCE is defined to 2, ____longjmp_chk is called, instead of longjmp. ____longjmp_chk compares the relative stack values to decide if it is called from a stack frame which called setjmp. If not, ____longjmp_chk assumes that an alternate signal stack is used. Since comparing the relative stack values isn't reliable with user context, when there is no signal, ____longjmp_chk will fail. Undefine _FORTIFY_SOURCE to avoid ____longjmp_chk in user context test.
2023-12-16Add a test for longjmp from user contextH.J. Lu1-0/+87
Verify that longjmp works correctly after setcontext is called to switch to a user context. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>