-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Service Arch 2019-12-02, Service Arch 2019-12-16
-
0
It seems that Windows doesn't allow us to dtor a locked mutex (that behavior is in fact UB). This implies that failures during lock could be hidden by consequential failures during unlock. We should:
- invariant that Mutex is unlocked on dtor via a boolean flag
- allow turning on and off the latch analyzer
- alter the test to have a stack of lock and unlock events
As an example for LatchAnalyzerTest::AddValidWasAbsent, we would:
l2.acquire(); l1.acquire(); { LatchAnalyzerDisabledBlock block; l1.release(); l2.release(); }