aboutsummaryrefslogtreecommitdiff
path: root/test/asan/TestCases/gc-test.cc
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-02-22 22:43:40 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-02-22 22:43:40 +0000
commitcd2dd3df15523e2be8d2bbace27641d6ac9fa40d (patch)
treefbdacaec253cc5ceee88cb44de5545fa32c8bd67 /test/asan/TestCases/gc-test.cc
parent476c4db3dc56bee43df384704c75ccc71cfa7a1d (diff)
downloadsrc-cd2dd3df15523e2be8d2bbace27641d6ac9fa40d.tar.gz
src-cd2dd3df15523e2be8d2bbace27641d6ac9fa40d.zip
Import compiler-rt trunk r230183.vendor/compiler-rt/compiler-rt-r230183
Notes
Notes: svn path=/vendor/compiler-rt/dist/; revision=279192 svn path=/vendor/compiler-rt/compiler-rt-r230183/; revision=279193; tag=vendor/compiler-rt/compiler-rt-r230183
Diffstat (limited to 'test/asan/TestCases/gc-test.cc')
-rw-r--r--test/asan/TestCases/gc-test.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/asan/TestCases/gc-test.cc b/test/asan/TestCases/gc-test.cc
index ffbea85b2650..4ffa51dd22d3 100644
--- a/test/asan/TestCases/gc-test.cc
+++ b/test/asan/TestCases/gc-test.cc
@@ -1,6 +1,9 @@
// RUN: %clangxx_asan %s -pthread -o %t
// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0
+// RUN: %clangxx_asan -O3 %s -pthread -o %t
+// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
+// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0
// REQUIRES: stable-runtime
#include <assert.h>
@@ -9,6 +12,7 @@
#include <sanitizer/asan_interface.h>
static const int kNumThreads = 2;
+static const int kLeftRedzoneSize = sizeof(void *) * 4;
void *Thread(void *unused) {
void *fake_stack = __asan_get_current_fake_stack();
@@ -23,7 +27,7 @@ void *Thread(void *unused) {
assert(real_stack);
assert((char*)beg <= (char*)&var[0]);
assert((char*)end > (char*)&var[0]);
- for (int i = -32; i < 15; i++) {
+ for (int i = -kLeftRedzoneSize; i < 15; i++) {
void *beg1, *end1;
char *ptr = &var[0] + i;
void *real_stack1 =