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

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 13:03:21 PST 2020


kubamracek created this revision.
kubamracek added reviewers: yln, delcypher, kcc, eugenis.
kubamracek added a project: Sanitizers.
kubamracek requested review of this revision.
Herald added a subscriber: Sanitizers.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93140

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


Index: compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
+++ compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
@@ -1066,7 +1066,7 @@
   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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93140.311302.patch
Type: text/x-patch
Size: 535 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201211/98922c60/attachment.bin>


More information about the llvm-commits mailing list