diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-22 19:43:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-22 19:43:28 +0000 |
commit | b5630dbadf9a2a06754194387d6b0fd9962a67f1 (patch) | |
tree | 3fe1e2bc0dc2823ab21f06959fbb3eaca317ea29 /unittests/Support/CrashRecoveryTest.cpp | |
parent | 7af96fb3afd6725a2824a0a5ca5dad34e5e0b056 (diff) |
Notes
Diffstat (limited to 'unittests/Support/CrashRecoveryTest.cpp')
-rw-r--r-- | unittests/Support/CrashRecoveryTest.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/unittests/Support/CrashRecoveryTest.cpp b/unittests/Support/CrashRecoveryTest.cpp index dbb0db5767937..33d87a1c0e4a9 100644 --- a/unittests/Support/CrashRecoveryTest.cpp +++ b/unittests/Support/CrashRecoveryTest.cpp @@ -17,11 +17,15 @@ #include <windows.h> #endif +extern "C" const char *__asan_default_options() { + return "allow_user_segv_handler=1"; +} + using namespace llvm; using namespace llvm::sys; static int GlobalInt = 0; -static void nullDeref() { *(volatile int *)nullptr = 0; } +static void nullDeref() { *(volatile int *)0x10 = 0; } static void incrementGlobal() { ++GlobalInt; } static void llvmTrap() { LLVM_BUILTIN_TRAP; } |