[compiler-rt] e2bcc33 - Change `asan/TestCases/Darwin/malloc_zone-protected.cpp` to call abort so that it **always crashes**.
Dan Liew via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 16 16:38:02 PST 2019
Author: Dan Liew
Date: 2019-12-16T16:37:50-08:00
New Revision: e2bcc33b50f6ca8f37ce2d501b88119fc21eb783
URL: https://github.com/llvm/llvm-project/commit/e2bcc33b50f6ca8f37ce2d501b88119fc21eb783
DIFF: https://github.com/llvm/llvm-project/commit/e2bcc33b50f6ca8f37ce2d501b88119fc21eb783.diff
LOG: Change `asan/TestCases/Darwin/malloc_zone-protected.cpp` to call abort so that it **always crashes**.
Summary:
This is needed because on some platforms we can't install signal
handlers and so the application just traps (i.e. crashes) rather than being intercepted
by ASan's signal handler which in the default Darwin config doesn't
exit with a crashing exit code.
rdar://problem/57984547
Reviewers: yln, kubamracek, jfb
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D71573
Added:
Modified:
compiler-rt/test/asan/TestCases/Darwin/malloc_zone-protected.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/asan/TestCases/Darwin/malloc_zone-protected.cpp b/compiler-rt/test/asan/TestCases/Darwin/malloc_zone-protected.cpp
index 362b60e20b55..125b544724d3 100644
--- a/compiler-rt/test/asan/TestCases/Darwin/malloc_zone-protected.cpp
+++ b/compiler-rt/test/asan/TestCases/Darwin/malloc_zone-protected.cpp
@@ -3,7 +3,7 @@
#include <stdio.h>
// RUN: %clangxx_asan %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
+// RUN: ASAN_OPTIONS="abort_on_error=1" not --crash %run %t 2>&1 | FileCheck %s
void *pwn(malloc_zone_t *unused_zone, size_t unused_size) {
More information about the llvm-commits
mailing list