aboutsummaryrefslogtreecommitdiff
path: root/lib/asan/asan_mac.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asan/asan_mac.cc')
-rw-r--r--lib/asan/asan_mac.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/asan/asan_mac.cc b/lib/asan/asan_mac.cc
index 5c2caeae4934..b35368617dca 100644
--- a/lib/asan/asan_mac.cc
+++ b/lib/asan/asan_mac.cc
@@ -101,7 +101,15 @@ void LeakyResetEnv(const char *name, const char *name_value) {
}
}
+static bool reexec_disabled = false;
+
+void DisableReexec() {
+ reexec_disabled = true;
+}
+
void MaybeReexec() {
+ if (reexec_disabled) return;
+
// Make sure the dynamic ASan runtime library is preloaded so that the
// wrappers work. If it is not, set DYLD_INSERT_LIBRARIES and re-exec
// ourselves.