[PATCH] D71573: Change `asan/TestCases/Darwin/malloc_zone-protected.cpp` to call abort so that it **always crashes**.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 14:30:14 PST 2019


delcypher created this revision.
delcypher added reviewers: yln, kubamracek.
Herald added a reviewer: jfb.
Herald added projects: Sanitizers, LLVM.
Herald added a subscriber: Sanitizers.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71573

Files:
  compiler-rt/test/asan/TestCases/Darwin/malloc_zone-protected.cpp


Index: compiler-rt/test/asan/TestCases/Darwin/malloc_zone-protected.cpp
===================================================================
--- compiler-rt/test/asan/TestCases/Darwin/malloc_zone-protected.cpp
+++ 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) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71573.234155.patch
Type: text/x-patch
Size: 535 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191216/1f28a11c/attachment.bin>


More information about the llvm-commits mailing list