[PATCH] D61337: [hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android.

Wink Saville via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 18:55:26 PDT 2019


winksaville added inline comments.


================
Comment at: compiler-rt/lib/hwasan/hwasan_linux.cpp:250
 
 #if HWASAN_WITH_INTERCEPTORS
 static pthread_key_t tsd_key;
----------------
This seems weird, what happens if HAWSAN_WITH_INTERCEPTORS is true and SANITIZER_ANDROID is true.  We would get this code but the GetCurrentThreadLongPtr() would be the version that calls get_android_tls_ptr() is that valid?


================
Comment at: compiler-rt/lib/hwasan/hwasan_linux.cpp:310
   uptr *ThreadLong = GetCurrentThreadLongPtr();
 #if HWASAN_WITH_INTERCEPTORS
   if (!*ThreadLong)
----------------
Since __hwasan_thread_enter() is always defined why is this code conditional? The other possibility is that the condition should be !SANITIZER_ANDROID so that it matches the value returned by GetCurrentThreadLongPtr().


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61337/new/

https://reviews.llvm.org/D61337





More information about the llvm-commits mailing list