diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-07 19:55:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-07 19:55:37 +0000 |
commit | ca9211ecdede9bdedb812b2243a4abdb8dacd1b9 (patch) | |
tree | 9b19e801150082c33e9152275829a6ce90614b55 /lib/tsan/lit_tests/signal_malloc.cc | |
parent | 8ef50bf3d1c287b5013c3168de77a462dfce3495 (diff) |
Diffstat (limited to 'lib/tsan/lit_tests/signal_malloc.cc')
-rw-r--r-- | lib/tsan/lit_tests/signal_malloc.cc | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/tsan/lit_tests/signal_malloc.cc b/lib/tsan/lit_tests/signal_malloc.cc deleted file mode 100644 index ef180b8a25b69..0000000000000 --- a/lib/tsan/lit_tests/signal_malloc.cc +++ /dev/null @@ -1,26 +0,0 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s -#include <stdio.h> -#include <stdlib.h> -#include <signal.h> -#include <sys/types.h> -#include <unistd.h> - -static void handler(int, siginfo_t*, void*) { - // CHECK: WARNING: ThreadSanitizer: signal-unsafe call inside of a signal - // CHECK: #0 malloc - // CHECK: #{{(1|2)}} handler(int, siginfo{{(_t)?}}*, void*) {{.*}}signal_malloc.cc:[[@LINE+2]] - // CHECK: SUMMARY: ThreadSanitizer: signal-unsafe call inside of a signal{{.*}}handler - volatile char *p = (char*)malloc(1); - p[0] = 0; - free((void*)p); -} - -int main() { - struct sigaction act = {}; - act.sa_sigaction = &handler; - sigaction(SIGPROF, &act, 0); - kill(getpid(), SIGPROF); - sleep(1); - return 0; -} - |