From e652de24c73378b36fbed4ff9a7038624d505835 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Thu, 1 Aug 2024 09:26:23 -0400 Subject: [PATCH] experiment: potentially fixing an ASAN issue --- tests/include/mir/test/barrier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/include/mir/test/barrier.h b/tests/include/mir/test/barrier.h index 2d349c78bf1..e1f8f7d118c 100644 --- a/tests/include/mir/test/barrier.h +++ b/tests/include/mir/test/barrier.h @@ -38,7 +38,7 @@ class Barrier void ready() { std::unique_lock lock(mutex); - if (--wait_threads) + if ((--wait_threads) > 0) { if (!cv.wait_for(lock, std::chrono::minutes(1), [&]{ return wait_threads == 0; })) throw std::runtime_error("Timeout");