[PATCH] D58396: [msan] Remove cxa_atexit_race.cc
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 19 12:36:16 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL354377: [msan] Remove cxa_atexit_race.cc (authored by vitalybuka, committed by ).
Herald added a subscriber: delcypher.
Changed prior to commit:
https://reviews.llvm.org/D58396?vs=187417&id=187427#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58396/new/
https://reviews.llvm.org/D58396
Files:
compiler-rt/trunk/test/msan/cxa_atexit_race.cc
Index: compiler-rt/trunk/test/msan/cxa_atexit_race.cc
===================================================================
--- compiler-rt/trunk/test/msan/cxa_atexit_race.cc
+++ compiler-rt/trunk/test/msan/cxa_atexit_race.cc
@@ -1,35 +0,0 @@
-// RUN: %clangxx_msan %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <atomic>
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-extern "C" int
-__cxa_atexit(void (*func)(void *), void *arg, void *d);
-
-void handler(void *) {
-}
-
-std::atomic_int counter;
-
-void *thread(void *) {
- for (int i = 0; i < 10000; ++i) {
- __cxa_atexit(&handler, 0, (void *)&handler);
- ++counter;
- }
- return 0;
-}
-
-int main(void) {
- printf("TEST_MAIN\n");
- pthread_t pt;
- for (int i = 0; i < 2; ++i)
- pthread_create(&pt, 0, &thread, 0);
- while (counter < 1000) {
- };
- return 0;
-}
-// CHECK: TEST_MAIN
-// CHECK-NOT: MemorySanitizer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58396.187427.patch
Type: text/x-patch
Size: 928 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190219/c654e10f/attachment.bin>
More information about the llvm-commits
mailing list