android_system_core/debuggerd
Josh Gao 60515bf9f1 debuggerd_handler: don't use snprintf in handler.
snprintf isn't safe to call in the linker after initialization, because
it uses MB_CUR_MAX which is implemented via pthread_getspecific, which
uses TLS slots shared with libc. If the TLS slots are assigned in a
different order between libc.so and the linker, MB_CUR_MAX will
evaluate to an incorrect value, and lead to snprintf doing bad things.

Switch to __libc_format_buffer.

Bug: http://b/35367169
Test: debuggerd -b `pidof zygote`
Change-Id: I9d315cf63e5f3fd2f4545d6e3f707cdbe94ec606
2017-02-15 12:24:09 -08:00
..
client debuggerd: advance our amazing bet. 2017-01-17 13:57:57 -08:00
crasher crasher: add a case that uses PR_SET_NO_NEW_PRIVS. 2017-02-14 14:40:47 -08:00
handler debuggerd_handler: don't use snprintf in handler. 2017-02-15 12:24:09 -08:00
include/debuggerd debuggerd_handler: add SIGSYS to the list of handled signals. 2017-01-23 16:01:14 -08:00
libdebuggerd Better seccomp/kuser_helper diagnostics from debuggerd. 2017-02-01 18:43:03 -08:00
tombstoned tombstoned: silence spurious error messages. 2017-01-23 16:01:14 -08:00
.clang-format debuggerd: add .clang-format. 2015-11-16 17:26:22 -08:00
Android.bp Better seccomp/kuser_helper diagnostics from debuggerd. 2017-02-01 18:43:03 -08:00
crash_dump.cpp debuggerd_handler: set PR_SET_DUMPABLE before running crash_dump. 2017-02-14 21:19:38 -08:00
debuggerd.cpp debuggerd: fix debuggerd <pid> 2017-01-30 17:58:04 -08:00
debuggerd_test.cpp debuggerd_handler: don't use waitpid(..., __WCLONE). 2017-02-13 17:01:24 -08:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
NOTICE auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
signal_sender.cpp liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
util.cpp debuggerd: advance our amazing bet. 2017-01-17 13:57:57 -08:00