glibc/sysdeps/nptl
Joseph Myers 548f467fa1 Avoid -Wstringop-overflow warning in pthread_cleanup_push macros
GCC 11 introduces a -Wstringop-overflow warning for calls to functions
with an array argument passed as a pointer to memory not large enough
for that array.  This includes the __sigsetjmp calls from
pthread_cleanup_push macros, because those use a structure in
__pthread_unwind_buf_t, which has a common initial subsequence with
jmp_buf but does not include the saved signal mask; this is OK in this
case because the second argument to __sigsetjmp is 0 so the signal
mask is not accessed.

To avoid this warning, use a function alias __sigsetjmp_cancel with
first argument an array of exactly the type used in the calls to the
function, if using GCC 11 or later.  With older compilers, continue to
use __sigsetjmp with a cast, to avoid any issues with compilers
predating the returns_twice attribute not applying the same special
handling to __sigsetjmp_cancel as to __sigsetjmp.

Tested with build-many-glibcs.py for arm-linux-gnueabi that this fixes
the testsuite build failures.
2020-10-30 22:25:42 +00:00
..
bits nptl: Move nptl-specific types to separate header 2020-02-09 13:56:48 +01:00
sys Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
aio_misc.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
allocrtsig.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
dl-tunables.list Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fork.c Linux: set_robust_list syscall number is always available 2020-03-03 12:49:44 +01:00
fork.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
futex-internal.c y2038: nptl: Provide __futex_clock_wait_bitset64 to support 64 bit bitset 2020-10-21 11:43:35 +02:00
futex-internal.h y2038: nptl: Provide __futex_clock_wait_bitset64 to support 64 bit bitset 2020-10-21 11:43:35 +02:00
gai_misc.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Implies Get rid of nptl/sysdeps/pthread/ subdirectory 2014-06-12 13:48:47 -07:00
internaltypes.h nptl: Add pthread_attr_setsigmask_np, pthread_attr_getsigmask_np 2020-06-02 11:59:18 +02:00
jmp-unwind.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
libc-lock.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
libc-lockP.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
librt-cancellation.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
lowlevellock-futex.h linux: Remove INTERNAL_SYSCALL_DECL 2020-02-14 21:12:45 -03:00
lowlevellock.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Makeconfig Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Makefile nptl: Add missing cancellation flags on futex_internal and pselect32 2020-10-07 15:24:04 -03:00
malloc-machine.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
proc_service.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
pthread-functions.h nptl: Move pthread_setschedparam implementation into libc 2020-02-20 08:57:01 +01:00
pthread-offsets.h nptl: update default pthread-offsets.h 2020-02-10 17:01:21 +01:00
pthread.h Avoid -Wstringop-overflow warning in pthread_cleanup_push macros 2020-10-30 22:25:42 +00:00
setxid.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
shm-directory.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
stdio-lock.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Subdirs Get rid of nptl/sysdeps/pthread/ subdirectory 2014-06-12 13:48:47 -07:00
tcb-offsets.h Get rid of nptl/sysdeps/pthread/ subdirectory 2014-06-12 13:48:47 -07:00
thrd_create.c C11 threads: Move implementation to sysdeps/pthread 2020-02-09 13:56:48 +01:00
thread_db.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
timer_routines.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tst-mqueue8x.c Get rid of nptl/sysdeps/pthread/ subdirectory 2014-06-12 13:48:47 -07:00
unwind-forcedunwind.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00