[PATCH] D40243: Handle NetBSD specific indirection of libpthread functions
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 05:12:56 PST 2017
krytarowski added a comment.
There is an open question what to do with tests. They report results with the mangled name in stack trace, instead of the regular libpthread(3) ones.
$ ./mutex
==================
WARNING: ThreadSanitizer: data race (pid=13274)
Write of size 4 at 0x0000014f9ec0 by thread T1 (mutexes: write M76):
#0 Thread1(void*) /public/llvm-build/mutex.cc:36:9 (mutex+0x46e5ec)
Previous write of size 4 at 0x0000014f9ec0 by thread T2:
#0 Thread2(void*) /public/llvm-build/mutex.cc:42:9 (mutex+0x46e6b7)
Location is global 'Global' of size 4 at 0x0000014f9ec0 (mutex+0x0000014f9ec0)
Mutex M76 (0x0000014f9ec8) created at:
#0 __libc_mutex_init /public/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1137:3 (mutex+0x413ef3)
#1 main /public/llvm-build/mutex.cc:66:3 (mutex+0x46e796)
Thread T1 (tid=2, running) created by main thread at:
#0 pthread_create /public/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:921:3 (mutex+0x412cf0)
#1 main /public/llvm-build/mutex.cc:71:3 (mutex+0x46e7b5)
Thread T2 (tid=3, finished) created by main thread at:
#0 pthread_create /public/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:921:3 (mutex+0x412cf0)
#1 main /public/llvm-build/mutex.cc:72:3 (mutex+0x46e7d4)
SUMMARY: ThreadSanitizer: data race /public/llvm-build/mutex.cc:36:9 in Thread1(void*)
==================
ThreadSanitizer: reported 1 warnings
`__libc_mutex_init` printed instead of `pthread_mutex_init`. This breaks tests that check for exact strings.
I will implement fix for tests (demangle names or change tests) in a dedicated review.
Repository:
rL LLVM
https://reviews.llvm.org/D40243
More information about the llvm-commits
mailing list