[PATCH] D17842: [ASAN] Add support for mips/mips64 android

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 3 11:20:57 PST 2016


eugenis added inline comments.

================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:595
@@ -594,2 +594,3 @@
     // oldact->sa_restorer upon a call to sigaction(xxx, NULL, oldact).
+#if !(SANITIZER_ANDROID && defined(__mips__) && !defined(__mips64))
     k_act.sa_restorer = u_act->sa_restorer;
----------------
samsonov wrote:
> You might introduce a separate #define that would tell you whether you're on 32-bit MIPS: it's better than
> spraying `defined(__mips__) && !defined(__mips64)` and its negation throughout the code.
Yes. We don't really do that now, but we can start.
Smth like SANITIZER_MIPS (for either variant), SANITIZER_MIPS32, SANITIZER_MIPS64. In sanitizer_platform.h.

================
Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.h:549
@@ -536,1 +548,3 @@
+#if SANITIZER_ANDROID
+#if SANITIZER_WORDSIZE == 64 || defined(__mips__)
   struct __sanitizer_sigaction {
----------------
samsonov wrote:
> That's incredibly hard to understand. Can you keep one level of nested #if's somehow?
If mips32 is special, it could be worth duplicating the entire __sanitizer_sigaction definition just for that.



Repository:
  rL LLVM

http://reviews.llvm.org/D17842





More information about the llvm-commits mailing list