[compiler-rt][ASAN] Speculatively fix Windows/dll_control_c.cpp test - use trap
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 9 Jul 2021 10:11:16 +0000 (13:11 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 9 Jul 2021 10:11:27 +0000 (13:11 +0300)
Please refer to https://reviews.llvm.org/D105338,
such store will not trap, it will be removed.

compiler-rt/test/asan/TestCases/Windows/dll_control_c.cpp

index e302763..f7c81e0 100644 (file)
@@ -12,7 +12,7 @@
 static void __declspec(noinline) CrashOnProcessDetach() {
   printf("CrashOnProcessDetach\n");
   fflush(stdout);
-  *static_cast<volatile int *>(0) = 0x356;
+  __builtin_trap();
 }
 
 bool g_is_child = false;