projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3cd38a8
)
Attempt to pacify ASan and UBSan reports in CrashRecovery tests
author
Reid Kleckner
<rnk@google.com>
Wed, 17 May 2017 22:23:20 +0000
(22:23 +0000)
committer
Reid Kleckner
<rnk@google.com>
Wed, 17 May 2017 22:23:20 +0000
(22:23 +0000)
llvm-svn: 303311
llvm/unittests/Support/CrashRecoveryTest.cpp
patch
|
blob
|
history
diff --git
a/llvm/unittests/Support/CrashRecoveryTest.cpp
b/llvm/unittests/Support/CrashRecoveryTest.cpp
index
dbb0db5
..
33d87a1
100644
(file)
--- a/
llvm/unittests/Support/CrashRecoveryTest.cpp
+++ b/
llvm/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; }