Add AssertLockHeld assertions in CWallet::ListCoins #10605
pull ryanofsky wants to merge 2 commits into bitcoin:master from ryanofsky:pr/listlock changing 3 files +16 −14-
ryanofsky commented at 7:44 pm on June 15, 2017: memberFixes TODO from #10295
-
fanquake added the label Wallet on Jun 16, 2017
-
sipa commented at 9:59 pm on June 16, 2017: memberutACK 5c7a7de7b38a84a3ba1e6c26dd1af67236dad891
-
laanwj renamed this:
Add AssertLockHeld assertions in CWallet::ListCoins
[dotnotmerge] Add AssertLockHeld assertions in CWallet::ListCoins
on Jun 24, 2017 -
ryanofsky force-pushed on Aug 29, 2017
-
ryanofsky force-pushed on Aug 29, 2017
-
ryanofsky force-pushed on Feb 9, 2018
-
ryanofsky force-pushed on Apr 6, 2018
-
ryanofsky renamed this:
[dotnotmerge] Add AssertLockHeld assertions in CWallet::ListCoins
Add AssertLockHeld assertions in CWallet::ListCoins
on Apr 6, 2018 -
ryanofsky commented at 5:58 pm on April 6, 2018: member
Be careful here: this is dependent on a PR that has not been merged yet. Do not merge.
Dependent PR #10244 got merged, so this is now safe to merge too.
Rebased 5c7a7de7b38a84a3ba1e6c26dd1af67236dad891 -> 8392051595c615216f3857d54a80cf708ed1f29e (pr/listlock.1 -> pr/listlock.2) due to conflict with #11126 Rebased 8392051595c615216f3857d54a80cf708ed1f29e -> cc69e88921725bed4b1e11823914aa8e418b7220 (pr/listlock.2 -> pr/listlock.3) Rebased cc69e88921725bed4b1e11823914aa8e418b7220 -> a6c634013b7cf5d74bea68e51c011effcd7fc11d (pr/listlock.3 -> pr/listlock.4) due to conflicts with #10295 and #12333 Rebased a6c634013b7cf5d74bea68e51c011effcd7fc11d -> 8740c61a334b3774984cfd1a3d67e33e68adb96a (pr/listlock.4 -> pr/listlock.5)
-
promag commented at 9:19 pm on April 6, 2018: memberutACK 8740c61.
-
Add AssertLockHeld assertions in CWallet::ListCoins 545e85eccc
-
ryanofsky force-pushed on Apr 11, 2018
-
ryanofsky commented at 3:45 pm on April 11, 2018: memberRebased 8740c61a334b3774984cfd1a3d67e33e68adb96a -> 545e85eccc2441c6d7745bb90d88dc14718455a2 (pr/listlock.5 -> pr/listlock.6) due to conflict with #12920
-
MarcoFalke commented at 8:21 pm on April 27, 2018: memberWould you mind adding the clang lock annotations here as well?
-
DrahtBot closed this on Jul 21, 2018
-
DrahtBot commented at 5:29 pm on July 21, 2018: member
-
DrahtBot reopened this on Jul 21, 2018
-
MarcoFalke commented at 5:51 pm on July 21, 2018: member@ryanofsky Are you still working on this? If so, mind to respond to my previous question from April?
-
MarcoFalke commented at 1:16 am on July 22, 2018: member
Missing locking annotations:
0wallet/wallet.cpp:2362:5: error: calling function 'AvailableCoins' requires holding mutex 'cs_wallet' exclusively [-Werror,-Wthread-safety-analysis] 1 AvailableCoins(availableCoins); 2 ^ 3wallet/wallet.cpp:2373:5: error: calling function 'ListLockedCoins' requires holding mutex 'cs_wallet' exclusively [-Werror,-Wthread-safety-analysis] 4 ListLockedCoins(lockedCoins); 5 ^
-
laanwj commented at 10:38 am on August 31, 2018: memberClosing as this seems to be inactive, let me know if you start work on this again and I should reopen it.
-
laanwj closed this on Aug 31, 2018
-
laanwj added the label Up for grabs on Aug 31, 2018
-
ryanofsky commented at 11:53 am on August 31, 2018: member
Closing as this seems to be inactive, let me know if you start work on this again and I should reopen it.
This PR can be reopened. There isn’t actually any work that needs to be done here since the clang errors @MarcoFalke reported were fixed by @skeees in #13423 (f393a533bebc088985f94c725b9af881500ba998).
-
MarcoFalke reopened this on Aug 31, 2018
-
MarcoFalke removed the label Up for grabs on Aug 31, 2018
-
MarcoFalke commented at 12:04 pm on August 31, 2018: member
@ryanofsky What I mean with locking annotations is the clang-annotations in the header file:
0diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h 1index 05ae9a1bbf..da326517c0 100644 2--- a/src/wallet/wallet.h 3+++ b/src/wallet/wallet.h 4@@ -764,7 +764,7 @@ public: 5 /** 6 * Return list of available coins and locked coins grouped by non-change output address. 7 */ 8- std::map<CTxDestination, std::vector<COutput>> ListCoins() const; 9+ std::map<CTxDestination, std::vector<COutput>> ListCoins() const EXCLUSIVE_LOCKS_REQUIRED(cs_main, cs_wallet); 10 11 /** 12 * Find non-change parent output.
Without these, it is only a best-guess runtime-check that the correct locks are taken for this method.
-
Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins
Suggested by MarcoFalke <falke.marco@gmail.com> in https://github.com/bitcoin/bitcoin/pull/10605#issuecomment-417643535
-
MarcoFalke commented at 12:13 pm on August 31, 2018: memberutACK 545e85eccc2441c6d7745bb90d88dc14718455a2 (given that the clang lock annotations are included in this commit)
-
MarcoFalke commented at 12:25 pm on August 31, 2018: memberutACK 62b6f0f21e24ff367d096c80ebdf398de4a98163
-
promag commented at 12:46 pm on August 31, 2018: memberutACK 62b6f0f.
-
MarcoFalke merged this on Aug 31, 2018
-
MarcoFalke closed this on Aug 31, 2018
-
MarcoFalke referenced this in commit b012bbe358 on Aug 31, 2018
-
Bushstar referenced this in commit 3102eba576 on Sep 4, 2018
-
jfhk referenced this in commit e66674943d on Nov 14, 2018
-
HashUnlimited referenced this in commit f6072117b2 on Nov 26, 2018
-
jasonbcox referenced this in commit b660a2d9f5 on Oct 11, 2019
-
jonspock referenced this in commit 0c6abd5881 on Dec 25, 2019
-
jonspock referenced this in commit 6c6044d2fc on Dec 26, 2019
-
jonspock referenced this in commit 623b2e06a5 on Dec 27, 2019
-
PastaPastaPasta referenced this in commit 3ed39fb7e8 on Jun 27, 2021
-
PastaPastaPasta referenced this in commit 3639112c81 on Jun 28, 2021
-
PastaPastaPasta referenced this in commit 1bbf70330f on Jun 29, 2021
-
PastaPastaPasta referenced this in commit c079031e99 on Jun 29, 2021
-
PastaPastaPasta referenced this in commit 017708af12 on Jun 29, 2021
-
PastaPastaPasta referenced this in commit f411978924 on Jun 29, 2021
-
PastaPastaPasta referenced this in commit 4c80a5f989 on Jun 29, 2021
-
PastaPastaPasta referenced this in commit 7c120a7124 on Jul 1, 2021
-
Munkybooty referenced this in commit 90c89bbfe8 on Jul 1, 2021
-
MarcoFalke locked this on Sep 8, 2021
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
More mirrored repositories can be found on mirror.b10c.me