summaryrefslogtreecommitdiff
path: root/lib/asan/tests/asan_noinst_test.cc
diff options
context:
space:
mode:
authorKuba Brecka <kuba.brecka@gmail.com>2014-12-22 17:32:27 +0000
committerKuba Brecka <kuba.brecka@gmail.com>2014-12-22 17:32:27 +0000
commit318b1518671be6ac681988090ef2acf942eec771 (patch)
tree3e9ef2e7a5c0fa7fe9f5e4ea9972639884903b1c /lib/asan/tests/asan_noinst_test.cc
parent7121d4db2ac4b22f37c83c10b5e2cc8b0c1b7411 (diff)
AddressSanitizer: Abort after failed exec() and get rid of the allow_reexec ASan flag
As mentioned in https://code.google.com/p/address-sanitizer/issues/detail?id=365, when the re-exec that adds the required DYLD_INSERT_LIBRARIES variable fails, ASan currently continues to run, but things are broken (some memory can be overwritten, interceptors don't work, ...). This patch aborts if the execv() fails and prints an error message that DYLD_INSERT_LIBRARIES is required. It also removes the "alllow_reexec" flag, since using it causes the same issues. Reviewed at http://reviews.llvm.org/D6752 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224712 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/tests/asan_noinst_test.cc')
-rw-r--r--lib/asan/tests/asan_noinst_test.cc9
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/asan/tests/asan_noinst_test.cc b/lib/asan/tests/asan_noinst_test.cc
index bb6af45bd..c469d62a6 100644
--- a/lib/asan/tests/asan_noinst_test.cc
+++ b/lib/asan/tests/asan_noinst_test.cc
@@ -31,15 +31,6 @@
// in this test. The static runtime library is linked explicitly (without
// -fsanitize=address), thus the interceptors do not work correctly on OS X.
-#if !defined(_WIN32)
-extern "C" {
-// Set specific ASan options for uninstrumented unittest.
-const char* __asan_default_options() {
- return "allow_reexec=0";
-}
-} // extern "C"
-#endif
-
// Make sure __asan_init is called before any test case is run.
struct AsanInitCaller {
AsanInitCaller() { __asan_init(); }