Index: compiler-rt/trunk/lib/asan/tests/asan_test_main.cc =================================================================== --- compiler-rt/trunk/lib/asan/tests/asan_test_main.cc +++ compiler-rt/trunk/lib/asan/tests/asan_test_main.cc @@ -28,9 +28,18 @@ namespace __sanitizer { bool ReexecDisabled() { +#if __has_feature(address_sanitizer) && SANITIZER_MAC + // Allow re-exec in instrumented unit tests on Darwin. Technically, we only + // need this for 10.10 and below, where re-exec is required for the + // interceptors to work, but to avoid duplicating the version detection logic, + // let's just allow re-exec for all Darwin versions. On newer OS versions, + // returning 'false' doesn't do anything anyway, because we don't re-exec. + return false; +#else return true; +#endif } -} +} // namespace __sanitizer int main(int argc, char **argv) { testing::GTEST_FLAG(death_test_style) = "threadsafe";