Commit d75e308e authored by Peter Collingbourne's avatar Peter Collingbourne
Browse files

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
parent 8b8e7d04
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment