]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/asan/TestCases/Posix/waitid.cc
1 // RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
2 // RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
9 int main(int argc
, char **argv
) {
13 int *status
= x
+ argc
* 3;
16 siginfo_t
*si
= (siginfo_t
*)(x
+ argc
* 3);
17 res
= waitid(P_ALL
, 0, si
, WEXITED
| WNOHANG
);
18 // CHECK: stack-buffer-overflow
19 // CHECK: {{WRITE of size .* at 0x.* thread T0}}
20 // CHECK: {{in .*waitid}}
21 // CHECK: {{in main .*waitid.cc:}}
22 // CHECK: is located in stack of thread T0 at offset