HomePhabricator

Clean up lockorder data of destroyed mutexes
5eeb913d6cffUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Clean up lockorder data of destroyed mutexes

The lockorder potential deadlock detection works by remembering for each
lock A that is acquired while holding another B the pair (A,B), and
triggering a warning when (B,A) already exists in the table.

A and B in the above text are represented by pointers to the CCriticalSection
object that is acquired. This does mean however that we need to clean up the
table entries that refer to any critical section which is destroyed, as it
memory address can potentially be used for another unrelated lock in the future.

Implement this clean up by remembering not only the pairs in forward direction,
but also backward direction. This allows for fast iteration over all pairs that
use a deleted CCriticalSection in either the first or the second position.

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Apr 8 2016, 20:14
deadalnixPushed on May 14 2017, 22:04
Parents
rABC0afac87e8173: Merge #7835: Version 2 transactions remain non-standard until CSV activates
Branches
Unknown
Tags
Unknown

Event Timeline

Pieter Wuille <pieter.wuille@gmail.com> committed rABC5eeb913d6cff: Clean up lockorder data of destroyed mutexes (authored by Pieter Wuille <pieter.wuille@gmail.com>).Apr 10 2016, 12:27