brintos

brintos / llvm-project-archived public Read only

0
0
Text · 563 B · a31485a Raw
19 lines · cpp
1// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s2#include "test.h"3 4int main() {5  int m = 0;6  AnnotateRWLockReleased(__FILE__, __LINE__, &m, 1);7  return 0;8}9 10// CHECK: WARNING: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread)11// CHECK:     #0 AnnotateRWLockReleased12// CHECK:     #1 main13// CHECK: Location is stack of main thread.14// CHECK:   Mutex {{.*}} created at:15// CHECK:     #0 AnnotateRWLockReleased16// CHECK:     #1 main17// CHECK: SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread)18 19