summaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/malloc_hooks.cpp
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2018-10-12 15:04:26 -0700
committerGreg Hackmann <ghackmann@google.com>2018-10-15 10:41:34 -0700
commitcc953e08f4c48af050a92c4d9fb365ae81c5e59b (patch)
tree4e3629a5c9e3a4ffdb3fba3620f2deda2308dc2c /libc/malloc_hooks/malloc_hooks.cpp
parenta2af8bea8c6c4b6ce6883bf92cbce922e0d9f458 (diff)
fdsan: reset va_list between varargs traversals
When error_level != ANDROID_FDSAN_ERROR_LEVEL_FATAL, fdsan_error() traverses the varargs twice. Each traversal needs its own va_start()/va_end() pair. Otherwise async_safe_format_buffer_va_list() will start consuming arguments where async_safe_format_log_va_list() stopped, ironically causing the sanitizer runtime to perform bad memory accesses. Test: debuggerd_test32 Test: debuggerd_test64 Change-Id: Ic85ca94501e55e9a435410fab89edb273c381a5a Signed-off-by: Greg Hackmann <ghackmann@google.com>
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
0 files changed, 0 insertions, 0 deletions