diff options
author | MacroFake <falke.marco@gmail.com> | 2022-05-16 14:17:57 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-05-16 14:18:08 +0200 |
commit | aa3200d8967215dc93ea75e19db0aca537ec3d35 (patch) | |
tree | 89cafefdbb20363b04ba4a0bfd9fce0d343942fa /src/qt/transactiondescdialog.h | |
parent | dc0ee573734ed49c054bfa3b97f1785c755dd0c3 (diff) | |
parent | 436ce0233c276e263dcb441255dc0b881cb39cfb (diff) |
Merge bitcoin/bitcoin#25109: Strengthen AssertLockNotHeld assertions
436ce0233c276e263dcb441255dc0b881cb39cfb sync.h: strengthen AssertLockNotHeld assertion (Anthony Towns)
7d73f58e9cea8f4b0bc16512983898fddde3d764 Increase threadsafety annotation coverage (Anthony Towns)
Pull request description:
This changes `AssertLockNotHeld` so that it is annotated with the negative capability for the mutex it refers to. clang applies negative capabilities recursively, so this helps avoid forgetting to annotate functions.
Note that this can't reasonably be used for globals, because clang would require every function to be annotated with `EXCLUSIVE_LOCKS_REQUIRED(!g_mutex)` for each global mutex. At present, the only global mutexes that use `AssertLockNotHeld` are `RecursiveMutex` so we treat that as an exception in order to avoid having to add an excessive number of negative annotations.
ACKs for top commit:
vasild:
ACK 436ce0233c276e263dcb441255dc0b881cb39cfb
MarcoFalke:
review ACK 436ce0233c276e263dcb441255dc0b881cb39cfb 🌺
Tree-SHA512: 5f16d098790a36b5277324d5ee89cdc87033c19b11c7943c2f630a41c2e3998eb39d356a763e857f4d8fefb6c0c02291f720bb6769bcbdf5e2cd765bf266ab8c
Diffstat (limited to 'src/qt/transactiondescdialog.h')
0 files changed, 0 insertions, 0 deletions