Details
-
Improvement
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
None
-
Fully Compatible
-
Service Arch 2019-12-02, Service Arch 2019-12-16
-
0
Description
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();
|
}
|