mirror of git://sourceware.org/git/glibc.git
Handle abort call for -fexceptions call
clang might generate an abort call when cleanup functions (set by __attribute__ ((cleanup)) calls functions not marked as nothrow. We can mitigate by marking some internal functions as __THROW, but it is not possible for functions that issue used-provided callbacks (for instance pthread_once).
This commit is contained in:
parent
b2a5c3abfd
commit
b4389f55ed
|
@ -1476,6 +1476,11 @@ rtld-stubbed-symbols += \
|
|||
__GI___vsyslog_chk \
|
||||
# rtld-stubbed-symbols
|
||||
|
||||
# clang might generate an abort call for cleanup functions.
|
||||
rtld-stubbed-symbols += \
|
||||
__GI_abort \
|
||||
# rtld-stubbed-symbols
|
||||
|
||||
ifeq ($(have-ssp),yes)
|
||||
# rtld is not built with the stack protector, so these references will
|
||||
# go away in the rebuilds.
|
||||
|
|
|
@ -30,6 +30,13 @@ asm ("strcpy = __GI_strcpy");
|
|||
asm ("strncpy = __GI_strncpy");
|
||||
asm ("strcat = __GI_strcat");
|
||||
|
||||
/* clang might generate an abort call when cleanup functions (set by
|
||||
__attribute__ ((cleanup)) calls functions not marked as nothrow.
|
||||
We can mitigate by marking some internal functions as __THROW,
|
||||
but it is not possible for functions that issue used-provided
|
||||
callbacks (for instance pthread_once). */
|
||||
asm ("abort = __GI_abort");
|
||||
|
||||
/* Some targets do not use __stack_chk_fail_local. In libc.so,
|
||||
redirect __stack_chk_fail to a hidden reference
|
||||
__stack_chk_fail_local, to avoid the PLT reference.
|
||||
|
|
|
@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
|
|||
#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
|
||||
|
||||
|
||||
extern void __lll_lock_wake_private (int *futex);
|
||||
extern void __lll_lock_wake_private (int *futex) __THROW;
|
||||
libc_hidden_proto (__lll_lock_wake_private)
|
||||
extern void __lll_lock_wake (int *futex, int private);
|
||||
extern void __lll_lock_wake (int *futex, int private) __THROW;
|
||||
libc_hidden_proto (__lll_lock_wake)
|
||||
|
||||
/* This is an expression rather than a statement even though its value is
|
||||
|
|
Loading…
Reference in New Issue