[Sanitizer] Add rudimentary support for wide-character strings to scanf/printf interc...
[blocksruntime.git] / test / tsan / mutex_bad_unlock.cc
blob2421e74a06662a362be12e74b4dbbde25065b28a
1 // RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s
2 extern "C" void AnnotateRWLockReleased(const char *f, int l, void *m, long rw);
4 int main() {
5 int m = 0;
6 AnnotateRWLockReleased(__FILE__, __LINE__, &m, 1);
7 return 0;
10 // CHECK: WARNING: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread)
11 // CHECK: #0 AnnotateRWLockReleased
12 // CHECK: #1 main
13 // CHECK: Location is stack of main thread.
14 // CHECK: Mutex {{.*}} created at:
15 // CHECK: #0 AnnotateRWLockReleased
16 // CHECK: #1 main
17 // CHECK: SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread)