Skip to content

[sync][mutex] Added test: mutex state is not used by the past owner after the next owner acquired the lock

Proposed scenario looks not so natural, but actually reproduces a bug that I explored at sync/condvar/tests/event/storage.cpp.

The test case is intended to fail on such implementations:

1 class Mutex:
2  def lock():
3   self.acquire_when_available()
4
5  def unlock():
6   self.mark_as_available()
7   self.access_internal_state()

Merge request reports

Loading