]> git.proxmox.com Git - rustc.git/blame - src/compiler-rt/test/asan/TestCases/strip_path_prefix.c
New upstream version 1.19.0+dfsg3
[rustc.git] / src / compiler-rt / test / asan / TestCases / strip_path_prefix.c
CommitLineData
1a4d82fc 1// RUN: %clang_asan -O2 %s -o %t
92a42be0 2// RUN: %env_asan_opts=strip_path_prefix='"%S/"' not %run %t 2>&1 | FileCheck %s
1a4d82fc
JJ
3
4#include <stdlib.h>
5int main() {
6 char *x = (char*)malloc(10 * sizeof(char));
7 free(x);
8 return x[5];
9 // Check that paths in error report don't start with slash.
10 // CHECK: heap-use-after-free
92a42be0 11 // CHECK: #0 0x{{.*}} in main {{.*}}strip_path_prefix.c:[[@LINE-3]]
1a4d82fc 12}