[llvm-branch-commits] [compiler-rt] f276c00 - [sanitizer] Restrict querying VM size on Darwin only to iOS devices

Kuba Mracek via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Dec 14 10:54:34 PST 2020


Author: Kuba Mracek
Date: 2020-12-14T10:48:48-08:00
New Revision: f276c008984dd02bb54707b2ace858cac5412e7e

URL: https://github.com/llvm/llvm-project/commit/f276c008984dd02bb54707b2ace858cac5412e7e
DIFF: https://github.com/llvm/llvm-project/commit/f276c008984dd02bb54707b2ace858cac5412e7e.diff

LOG: [sanitizer] Restrict querying VM size on Darwin only to iOS devices

We currently do this for SANITIZER_IOS, which includes devices *and* simulators. This change opts out the check for simulators to unify the behavior with macOS, because VM size is really a property of the host OS, and not the simulator.

<rdar://problem/72129387>

Differential Revision: https://reviews.llvm.org/D93140

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
index 62d422d043d7..6fe6991bc816 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
@@ -1066,7 +1066,7 @@ char **GetArgv() {
   return *_NSGetArgv();
 }
 
-#if SANITIZER_IOS
+#if SANITIZER_IOS && !SANITIZER_IOSSIM
 // The task_vm_info struct is normally provided by the macOS SDK, but we need
 // fields only available in 10.12+. Declare the struct manually to be able to
 // build against older SDKs.


        


More information about the llvm-branch-commits mailing list