This meta-issue tracks the status of the Clang thread safety analysis PRs.
- Fix
-Wthread-safety-analysiswarnings. Compile with-Wthread-safety-analysisif available. (#10866) - travis: Build with
--enable-werrorunder OS X (#10923) - net: Add missing lock in
ProcessHeadersMessage(...)(#11578) - addrman: Add missing lock in
Clear()(CAddrMan) (#11585) - rpc: Lock
cs_maininblockToJSON/blockheaderToJSON(#11618) - Avoid lock: Call
FlushStateToDisk(...)regardless offCheckForPruning(#11617) - tests: Add missing locks to tests (#11623)
- Add missing
cs_wallet/cs_KeyStorelocks to wallet (#11634) - Add missing locks:
validation.cpp+ related (#11652) - mempool: Fix missing locking in
CTxMemPool::check(…)andCTxMemPool::setSanityCheck(…)(#11689) - qt: Remove redundant locks (#11733)
- net: Add missing locks in
net.{cpp,h}(#11744) - Avoid locking mutexes that are already held by the same thread (#11762)
- net: Avoid locking
cs_vNodestwice when callingFindNode(...). AddNodeExists(...)(#11795) - tests: Make
test_bitcoinpass under ThreadSanitzer (clang). Fix lock-order-inversion (potential deadlock). (#12882) - Add compile time checking for all
cs_KeyStoreruntime locking assertions (#13077) - mempool: Add compile time checking for all
::mempool.csruntime locking assertions (#13080) - wallet: Add compile time checking for all
cs_walletruntime locking assertions (#13081) - Add compile time checking for all
cs_mainruntime locking assertions (#13083) - wallet/keystore: Add Clang thread safety annotations for variables guarded by
cs_KeyStore(#13114) - addrman: Add Clang thread safety annotations for variables guarded by
cs_addrMan(#13115) - Add Clang thread safety annotations for variables guarded by
cs_{rpcWarmup,nTimeOffset,warnings}(#13116) - net: Add Clang thread safety annotations for guarded variables in the networking code (#13123)
- scheduler: Add Clang thread safety annotations for variables guarded by
m_cs_callbacks_pending(#13125) - util: Add Clang thread safety annotations for variables guarded by
cs_args(#13126) - wallet: Add Clang thread safety annotations for variables guarded by
cs_db(#13127) - policy: Add Clang thread safety annotations for variables guarded by
cs_feeEstimator(#13128) - Move
cs_mainlocking annotations from.cppto.h(#14063) - tests: Add missing locking annotations and locks (
g_cs_orphans) (#14108) - Add compile time checking for
cs_mainlocks which we assert at run time (#14444)