From 40449e5fd41344c1a44c8acf5184ca4545fc7d0c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 31 Jul 2021 18:25:34 +0100 Subject: Unlocking an unlocked mutex trips tsan --- test/semaphore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/semaphore.cpp b/test/semaphore.cpp index 09124ee..b7e089f 100644 --- a/test/semaphore.cpp +++ b/test/semaphore.cpp @@ -21,7 +21,7 @@ semaphore::acquire() bool semaphore::try_dec() { - std::lock_guard lk {m}; + m.lock(); if (v) { v--; m.unlock(); -- cgit v1.2.3