]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cc
1 // RUN: %clang_cl_asan -O0 %s -Fe%t
2 // RUN: not %run %t 2>&1 | FileCheck %s
12 printf("Initial test OK\n");
14 // CHECK: Initial test OK
16 str
[5] = '!'; // Losing '\0' at the end.
17 int len
= strlen(str
);
18 // CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
19 // FIXME: Should be READ of size 1, see issue 155.
20 // CHECK: READ of size {{[0-9]+}} at [[ADDR]] thread T0
22 // CHECK-NEXT: main {{.*}}intercept_strlen.cc:[[@LINE-5]]
23 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
24 // CHECK-NEXT: main {{.*}}intercept_strlen.cc
25 // CHECK: 'str' <== Memory access at offset {{.*}} overflows this variable