diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2014-05-14 14:12:02 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2014-05-14 14:12:02 +0000 |
commit | 11398c1f23fe859497046249fd135cf474457f4f (patch) | |
tree | 6f9975e382bc06ed35dfc5f7c1a3a37a307b7a30 /test/asan/TestCases/waitid.cc | |
parent | 4dbaff410b480a0922644b45f1044a52a58a07c7 (diff) |
[ASan tests] Create a Posix/ directory for tests that we don't plan to run on Windows
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/asan/TestCases/waitid.cc')
-rw-r--r-- | test/asan/TestCases/waitid.cc | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/test/asan/TestCases/waitid.cc b/test/asan/TestCases/waitid.cc deleted file mode 100644 index edfe3ed72..000000000 --- a/test/asan/TestCases/waitid.cc +++ /dev/null @@ -1,27 +0,0 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s - -#include <assert.h> -#include <sys/wait.h> -#include <unistd.h> - -int main(int argc, char **argv) { - pid_t pid = fork(); - if (pid) { // parent - int x[3]; - int *status = x + argc * 3; - int res; - - siginfo_t *si = (siginfo_t*)(x + argc * 3); - res = waitid(P_ALL, 0, si, WEXITED | WNOHANG); - // CHECK: stack-buffer-overflow - // CHECK: {{WRITE of size .* at 0x.* thread T0}} - // CHECK: {{in .*waitid}} - // CHECK: {{in main .*waitid.cc:}} - // CHECK: is located in stack of thread T0 at offset - // CHECK: {{in main}} - return res != -1; - } - // child - return 0; -} |