Skip to content

Commit

Permalink
[sanitizer] Restrict querying VM size on Darwin only to iOS devices
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kubamracek committed Dec 14, 2020
1 parent 8955e9f commit f276c00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f276c00

Please sign in to comment.