summaryrefslogtreecommitdiff
path: root/test/tsan/Linux
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2016-04-14 12:10:21 +0000
committerRenato Golin <renato.golin@linaro.org>2016-04-14 12:10:21 +0000
commita7c0f5fbb8beb1d4651215e08b5750b77abd59b2 (patch)
tree5b8936b78fc6186233dad4beec221b48d1dc44f8 /test/tsan/Linux
parentd9e994edcd721d505f2c8c66953532177552df06 (diff)
Make tsan tests more portable (take 2)
Using stderr more uniformily, avoiding potential races when scanning stdout and stderr output. Patch by Maxim Kuvyrkov. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266294 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tsan/Linux')
-rw-r--r--test/tsan/Linux/user_malloc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/tsan/Linux/user_malloc.cc b/test/tsan/Linux/user_malloc.cc
index c671bfcdd..9c3ce681d 100644
--- a/test/tsan/Linux/user_malloc.cc
+++ b/test/tsan/Linux/user_malloc.cc
@@ -8,7 +8,7 @@ extern "C" void __interceptor_free(void *p);
extern "C" void *malloc(unsigned long size) {
static int first = 0;
if (__sync_lock_test_and_set(&first, 1) == 0)
- printf("user malloc\n");
+ fprintf(stderr, "user malloc\n");
return __interceptor_malloc(size);
}