[llvm] r303785 - Prevent UBSan report in CrashRecovery tests

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 11:11:57 PDT 2017


Author: vitalybuka
Date: Wed May 24 13:11:57 2017
New Revision: 303785

URL: http://llvm.org/viewvc/llvm-project?rev=303785&view=rev
Log:
Prevent UBSan report in CrashRecovery tests
Reverted by mistake with r303783.

Modified:
    llvm/trunk/unittests/Support/CrashRecoveryTest.cpp

Modified: llvm/trunk/unittests/Support/CrashRecoveryTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/CrashRecoveryTest.cpp?rev=303785&r1=303784&r2=303785&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/CrashRecoveryTest.cpp (original)
+++ llvm/trunk/unittests/Support/CrashRecoveryTest.cpp Wed May 24 13:11:57 2017
@@ -21,7 +21,7 @@ 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; }
 




More information about the llvm-commits mailing list