Summary: This commit adds symbolize_vs_style=false to every instance of ASAN_OPTIONS in the asan tests and sets ASAN_OPTIONS=symbolize_vs_style=false in lit, for tests which don't set it. This way we don't need to make the tests be able to deal with both symbolize styles. This is the first patch in the series. I will eventually submit for the other sanitizers too. We need this change (or another way to deal with the different outputs) in order to be able to default to symbolize_vs_style=true on some platforms. Adding to this change, I'm also adding "env " before any command line which sets environment variables. That way the test works on other host shells, like we have if the host is running Windows. Reviewers: samsonov, kcc, rnk Subscribers: tberghammer, llvm-commits Differential Revision: http://reviews.llvm.org/D10294 llvm-svn: 239754
27 lines
764 B
C++
27 lines
764 B
C++
// Check that UAR mode can handle very deep recusrion.
|
|
// RUN: export ASAN_OPTIONS=$ASAN_OPTIONS:detect_stack_use_after_return=1
|
|
// RUN: %clangxx_asan -O2 %s -o %t && \
|
|
// RUN: (ulimit -s 4096; %run %t) 2>&1 | FileCheck %s
|
|
|
|
// Also check that use_sigaltstack+verbosity doesn't crash.
|
|
// RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:verbosity=1:use_sigaltstack=1 %run %t | FileCheck %s
|
|
#include <stdio.h>
|
|
|
|
__attribute__((noinline))
|
|
void RecursiveFunc(int depth, int *ptr) {
|
|
if ((depth % 1000) == 0)
|
|
printf("[%05d] ptr: %p\n", depth, ptr);
|
|
if (depth == 0)
|
|
return;
|
|
int local;
|
|
RecursiveFunc(depth - 1, &local);
|
|
}
|
|
|
|
int main(int argc, char **argv) {
|
|
RecursiveFunc(15000, 0);
|
|
return 0;
|
|
}
|
|
// CHECK: [15000] ptr:
|
|
// CHECK: [07000] ptr:
|
|
// CHECK: [00000] ptr:
|