mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
ed421fca42
__stack_chk_fail is called on corrupted stack. Stack backtrace is very unreliable against corrupted stack. __libc_message is changed to accept enum __libc_message_action and call BEFORE_ABORT only if action includes do_backtrace. __fortify_fail_abort is added to avoid backtrace from __stack_chk_fail. [BZ #12189] * debug/Makefile (CFLAGS-tst-ssp-1.c): New. (tests): Add tst-ssp-1 if -fstack-protector works. * debug/fortify_fail.c: Include <stdbool.h>. (_fortify_fail_abort): New function. (__fortify_fail): Call _fortify_fail_abort. (__fortify_fail_abort): Add a hidden definition. * debug/stack_chk_fail.c: Include <stdbool.h>. (__stack_chk_fail): Call __fortify_fail_abort, instead of __fortify_fail. * debug/tst-ssp-1.c: New file. * include/stdio.h (__libc_message_action): New enum. (__libc_message): Replace int with enum __libc_message_action. (__fortify_fail_abort): New hidden prototype. * malloc/malloc.c (malloc_printerr): Update __libc_message calls. * sysdeps/posix/libc_fatal.c (__libc_message): Replace int with enum __libc_message_action. Call BEFORE_ABORT only if action includes do_backtrace. (__libc_fatal): Update __libc_message call. |
||
---|---|---|
.. | ||
alloc_buffer_alloc_array.c | ||
alloc_buffer_allocate.c | ||
alloc_buffer_copy_bytes.c | ||
alloc_buffer_copy_string.c | ||
alloc_buffer_create_failure.c | ||
arena.c | ||
Depend | ||
dynarray_at_failure.c | ||
dynarray_emplace_enlarge.c | ||
dynarray_finalize.c | ||
dynarray_resize_clear.c | ||
dynarray_resize.c | ||
dynarray-skeleton.c | ||
dynarray.h | ||
hooks.c | ||
Makefile | ||
malloc-hooks.h | ||
malloc-internal.h | ||
malloc.c | ||
malloc.h | ||
mallocbug.c | ||
mcheck-init.c | ||
mcheck.c | ||
mcheck.h | ||
memusage.c | ||
memusage.sh | ||
memusagestat.c | ||
morecore.c | ||
mtrace.c | ||
mtrace.pl | ||
obstack.c | ||
obstack.h | ||
reallocarray.c | ||
scratch_buffer_grow_preserve.c | ||
scratch_buffer_grow.c | ||
scratch_buffer_set_array_size.c | ||
set-freeres.c | ||
thread-freeres.c | ||
tst-alloc_buffer.c | ||
tst-calloc.c | ||
tst-dynarray-at-fail.c | ||
tst-dynarray-fail.c | ||
tst-dynarray-shared.h | ||
tst-dynarray.c | ||
tst-interpose-aux-nothread.c | ||
tst-interpose-aux-thread.c | ||
tst-interpose-aux.c | ||
tst-interpose-aux.h | ||
tst-interpose-nothread.c | ||
tst-interpose-skeleton.c | ||
tst-interpose-static-nothread.c | ||
tst-interpose-static-thread.c | ||
tst-interpose-thread.c | ||
tst-malloc-backtrace.c | ||
tst-malloc-fork-deadlock.c | ||
tst-malloc-thread-exit.c | ||
tst-malloc-thread-fail.c | ||
tst-malloc-usable-static-tunables.c | ||
tst-malloc-usable-static.c | ||
tst-malloc-usable-tunables.c | ||
tst-malloc-usable.c | ||
tst-malloc.c | ||
tst-mallocfork2.c | ||
tst-mallocfork.c | ||
tst-mallocstate.c | ||
tst-mallopt.c | ||
tst-mcheck.c | ||
tst-memalign.c | ||
tst-mtrace.c | ||
tst-mtrace.sh | ||
tst-obstack.c | ||
tst-posix_memalign.c | ||
tst-pvalloc.c | ||
tst-realloc.c | ||
tst-reallocarray.c | ||
tst-scratch_buffer.c | ||
tst-trim1.c | ||
tst-valloc.c | ||
Versions |