[PATCH] D15626: Add iOS/watchOS/tvOS support for ASan (compiler-rt part)
Anna Zaks via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 17 15:28:31 PST 2015
zaks.anna added inline comments.
================
Comment at: lib/asan/asan_mapping.h:150
@@ +149,3 @@
+# if SANITIZER_IOS
+# if SANITIZER_IOSSIM
+# define SHADOW_OFFSET kIosSimShadowOffset64
----------------
samsonov wrote:
> See how we deal with SANITIZER_IOS/SANITIZER_IOSSIM above - maybe do the same?
I think this way of writing it is less error prone. SANITIZER_IOS is set for both the simulator and the device. If the order of elifs above is reversed, the logic would break. I think it's better to rewrite the code above to make it more explicit.
================
Comment at: lib/sanitizer_common/sanitizer_mac.cc:361
@@ -354,1 +360,3 @@
bool IsDeadlySignal(int signum) {
+#if (SANITIZER_WATCHOS || SANITIZER_TVOS) && !SANITIZER_IOSSIM
+ // Handling fatal signals on watchOS and tvOS devices is disallowed.
----------------
samsonov wrote:
> This is wrong - of course SIGSEGV is deadly, we just don't need to handle it.
How about we rename the function into "IsHandledDeadlySignal". It already only returns true if common_flags()->handle_segv.
http://reviews.llvm.org/D15626
More information about the llvm-commits
mailing list