diff options
author | Peter Collingbourne <pcc@google.com> | 2019-01-31 16:27:54 -0800 |
---|---|---|
committer | Peter Collingbourne <pcc@google.com> | 2019-03-19 21:56:17 -0700 |
commit | d75e308e61e99dc62ddaf6b4b554740ad44a2b90 (patch) | |
tree | 532c0cff8323dfafc034a116de95bc18ed5d9bdd /libc/malloc_debug/malloc_debug.cpp | |
parent | 8b8e7d04615593c366ed32ed21a979896af87135 (diff) |
Call __hwasan_init_static() during libc startup in statically linked executables.
__hwasan_init() was segfaulting when called from here because it
was calling into libc functions which required more of libc to be
initialized. Instead, call __hwasan_init_static(), which does a
minimal amount of initialization for statically linked executables,
just enough that we can run instrumented code. __hwasan_init() itself
will end up being called later (most likely from a global ctor)
after libc is fully initialized.
We'll need to wait for LLVM r352816+r352823 to land in our toolchain
before landing this.
Change-Id: I12ffc7e08f6dd161e4ff2088f8d56265af7baedf
Diffstat (limited to 'libc/malloc_debug/malloc_debug.cpp')
0 files changed, 0 insertions, 0 deletions