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

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 15:25:49 PDT 2019


eugenis added inline comments.


================
Comment at: compiler-rt/lib/hwasan/hwasan_interceptors.cpp:224
+
+#if HWASAN_WITH_INTERCEPTORS && defined(__aarch64__)
+/*
----------------
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



================
Comment at: compiler-rt/lib/hwasan/hwasan_interceptors.cpp:271
+  register void *env_address asm ("x0") = &env[0];
+  asm volatile (
+	"ldp	x19, x20, [%0, #0<<3];"
----------------
Why can't this asm be replaced with REAL(longjmp)(env, retval) ?


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