summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuba Brecka <kuba.brecka@gmail.com>2016-03-24 13:20:38 +0000
committerKuba Brecka <kuba.brecka@gmail.com>2016-03-24 13:20:38 +0000
commit5ac97845b13293cc7984eeaaacf1e9e9b23eb1f0 (patch)
tree710467263511532b6fee5ac875fa18475dd5f4f6
parent01b723ba438ca5ed73c75f09c535070d9843566c (diff)
downloadbcm5719-llvm-5ac97845b13293cc7984eeaaacf1e9e9b23eb1f0.tar.gz
bcm5719-llvm-5ac97845b13293cc7984eeaaacf1e9e9b23eb1f0.zip
Follow-up for r264261, adding a comment explaining what the testcase does.
llvm-svn: 264271
-rw-r--r--compiler-rt/test/tsan/Darwin/malloc-stack-logging.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler-rt/test/tsan/Darwin/malloc-stack-logging.cc b/compiler-rt/test/tsan/Darwin/malloc-stack-logging.cc
index 447fcd1a939..8d9c2122d0e 100644
--- a/compiler-rt/test/tsan/Darwin/malloc-stack-logging.cc
+++ b/compiler-rt/test/tsan/Darwin/malloc-stack-logging.cc
@@ -1,3 +1,8 @@
+// Test that MallocStackLogging=1 doesn't crash. MallocStackLogging turns on
+// callbacks from mmap/munmap libc function into libmalloc. Darwin-specific
+// ThreadState initialization needs to avoid calling the library functions (and
+// use syscalls directly) to make sure other interceptors aren't called.
+
// RUN: %clangxx_tsan -O1 %s -o %t
// RUN: MallocStackLogging=1 %run %t 2>&1 | FileCheck %s
#include <pthread.h>
OpenPOWER on IntegriCloud