[hwasan] Enable Android logging.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 16 Aug 2018 21:56:04 +0000 (21:56 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 16 Aug 2018 21:56:04 +0000 (21:56 +0000)
Summary: Enable syslog as soon as the shadow is mapped.

Reviewers: vitalybuka, kcc

Subscribers: srhines, kubamracek, llvm-commits

Differential Revision: https://reviews.llvm.org/D50865

llvm-svn: 339950

compiler-rt/lib/hwasan/hwasan.cc

index bb9a8dd..3d8a8e8 100644 (file)
@@ -198,6 +198,9 @@ void __hwasan_init() {
   __hwasan_shadow_init();
   MadviseShadow();
 
+  // This may call libc -> needs initialized shadow.
+  AndroidLogInit();
+
   InitializeInterceptors();
   InstallDeadlySignalHandlers(HwasanOnDeadlySignal);
   InstallAtExitHandler(); // Needs __cxa_atexit interceptor.