TheBlueMatt
commented at 10:47 pm on November 15, 2017:
member
Technically there is no issue here - mempool (should only be) modified with cs_main and mempool.check is only called with cs_main. Indeed, probably just move the lock to the top of the function. Unless you want to go to the trouble of making nCheckFrequency a const, best to fix it for the static analysis just like the rest.
practicalswift force-pushed
on Nov 16, 2017
practicalswift renamed this:
mempool: Fix missing locking in CTxMemPool::check(const CCoinsViewCache *pcoins)
mempool: Fix missing locking in CTxMemPool::check(…) and CTxMemPool::setSanityCheck(…)
on Nov 16, 2017
practicalswift
commented at 9:10 am on November 16, 2017:
contributor
@TheBlueMatt@promag Thanks for reviewing! An updated version has now been pushed taking into account the formal locking requirements of nCheckFrequency too. Please re-review :-)
practicalswift
commented at 6:46 am on November 23, 2017:
contributor
Added a commit with the Clang thread safety analysis annotations to facilitate reviewing. @promag, would you mind re-reviewing? :-)
practicalswift force-pushed
on Nov 29, 2017
practicalswift
commented at 11:06 pm on November 29, 2017:
contributor
Updated with annotations moved over to the header files.
The EXCLUSIVE_LOCKS_REQUIRED(mempool.cs) annotations for BlockAssembler::SkipMapTxEntry and BlockAssembler::addPackageTxs should be placed in miner.h rather than miner.cpp, but the existence of mempool (and hence mempool.cs) is not currently not known in miner.h. Would extern CTxMemPool mempool; be acceptable in miner.h?
TheBlueMatt
commented at 5:46 pm on December 4, 2017:
member
As mentioned before, please do not place EXCLUSIVE_LOCKS_REQUIRED annotations on class member function declarations instead of their definitions. Placing them on declarations makes the annotations incredibly brittle and, thus, largely useless. Better to leave them off than to add them in a place where the order of functions in a file matters.
practicalswift force-pushed
on Mar 12, 2018
practicalswift force-pushed
on Mar 12, 2018
practicalswift
commented at 11:16 pm on March 12, 2018:
contributor
@TheBlueMatt Sorry, I had missed moving the annotations for SkipMapTxEntry, addPackageTxs, UpdateChildrenForRemoval and CalculateDescendants. Now fixed! Please re-review :-)
sipa
commented at 0:19 am on March 17, 2018:
member
utACK661db1d63afcea4016ccb7f97fda6cde7f719826
practicalswift force-pushed
on Apr 3, 2018
practicalswift
commented at 11:35 am on April 3, 2018:
contributor
Rebased!
practicalswift force-pushed
on May 5, 2018
Fix missing locking in CTxMemPool::check(const CCoinsViewCache *pcoins)
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-12-18 18:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me