diff options
author | Mitch Phillips <mitchp@google.com> | 2020-02-26 11:28:11 -0800 |
---|---|---|
committer | Mitch Phillips <mitchp@google.com> | 2020-02-26 16:50:58 -0800 |
commit | 5f91bf42e30dcca3529d30749d9004f09dd3431b (patch) | |
tree | a8e52d4eacc78996d15d17fada95f144b0c50dc6 /libc/malloc_debug/tests/malloc_debug_system_tests.cpp | |
parent | 6cf75230d9feae269a823c7dd43433baf1b71465 (diff) |
[GWP-ASan] [heapprofd] Nullptr deref in dispatch.
Heapprofd uses an ephemeral dispatch table to ensure that GWP-ASan can
be called during heapprofd initialization. Previously, we grabbed the
backup dispatch table from the globals, which is wrong if GWP-ASan isn't
installed (as the malloc_dispatch_table is linker-initialised and not
set to a known good value if a malloc hooker isn't used).
Instead, grab the correct ephemeral dispatch table. When GWP-ASan is
installed, use a copy of its table as the dispatch. When nothing is
installed, fall back to using the native allocator dispatch.
Bug: 135634846
Bug: 150085813
Test: atest perfetto_integrationtests
Test: TracedPerfCtsTest.SystemWideDebuggableApp on cuttlefish x86.
Change-Id: I4beaf9192acadbe00adc02de2e0b0aab6f7a2190
Diffstat (limited to 'libc/malloc_debug/tests/malloc_debug_system_tests.cpp')
0 files changed, 0 insertions, 0 deletions