[PATCH] D69045: libhwasan interceptor ABI intercept longjmp/setjmp

Matthew Malcomson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 07:14:00 PDT 2019


mmalcomson added inline comments.


================
Comment at: compiler-rt/lib/hwasan/hwasan_interceptors.cpp:224
+
+#if HWASAN_WITH_INTERCEPTORS && defined(__aarch64__)
+/*
----------------
mmalcomson wrote:
> eugenis wrote:
> > This won't work on Android, please add && !SANITIZER_ANDROID.
> > 
> > Just FYI, this is what we do there:
> > https://android.googlesource.com/platform/bionic/+/919dc05d66b129ad6f34fad95322efb6de245754/libc/arch-arm64/bionic/setjmp.S#214
> > 
> Can do, but I don't fully understand -- could you explain why a bit more?
> 
> I was thinking that the Android "platform ABI" would handle longjmp, but the Android "interceptor ABI" would have the same missing feature as any other interceptor ABI.
> 
> I would have guessed that the feature check in the bionic sources would be essentially checking for the platform ABI -- since if using the interceptor ABI bionic wouldn't know that hwasan is being used.
Ah ... I figure the reason it won't work for Android is to do with the dynamic loader feature mentioned in https://reviews.llvm.org/D55986 . 

Hence a `setjmp` could be from the libc while the `longjmp` is from the interceptor ... correct?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69045





More information about the llvm-commits mailing list