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
Loading
Please sign in to comment