[llvm] r303311 - Attempt to pacify ASan and UBSan reports in CrashRecovery tests
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Wed May 17 15:38:29 PDT 2017
FTR: Vitaly is planing to change the meaning/syntax/name of
allow_user_segv_handler=1
On Wed, May 17, 2017 at 3:23 PM, Reid Kleckner via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: rnk
> Date: Wed May 17 17:23:20 2017
> New Revision: 303311
>
> URL: http://llvm.org/viewvc/llvm-project?rev=303311&view=rev
> Log:
> Attempt to pacify ASan and UBSan reports in CrashRecovery tests
>
> 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=303311&r1=303310&r2=303311&view=diff
> ============================================================
> ==================
> --- llvm/trunk/unittests/Support/CrashRecoveryTest.cpp (original)
> +++ llvm/trunk/unittests/Support/CrashRecoveryTest.cpp Wed May 17
> 17:23:20 2017
> @@ -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; }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170517/1a4b39d5/attachment.html>
More information about the llvm-commits
mailing list