sync.h: fix LockAssertion error reporting#19970
sync.h: fix LockAssertion error reporting#19970ajtowns wants to merge 1 commit intobitcoin:masterfrom
Conversation
39e8f5b to
07ccd1d
Compare
07ccd1d to
df7a0ab
Compare
|
Code review ACK df7a0ab. Code change looks fine, but I think this is a bad approach for a few reasons:
|
Both of those are appropriate justifications for a PR to change the approach. They'd be a valid objection to something that somehow prevents future PRs from changing the approach, but this PR doesn't do that.
The developer notes state that using compile-time annotations are to be used consistently, and LOCK_ASSERTION is only to be used when that fails. The implementation of LOCK_ASSERTION as it stands will cause compile errors if you use the wrong assertion. I think you're completely mistaken in thinking LOCK_ASSERTION looks "safer" than "AssertLockHeld".
It's a "fix" because it corrects obviously broken behaviour, and it's "quick" because it leaves the issues where there's debate about what to do them to be addressed elsewhere. This isn't an "alternative" to other approaches as you suggest in your edit to the PR description, it's just a first step. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
|
No longer relevant |
Signet
38332, 38334 -> 31932, 31934
m_onion_service_target_port
main: 51734, test: 51934, regtest: 51931
sendtoaddress gets new parameter: verbose
Argument names are enforced.
Changed functional tests to pass by position instead of by name.
AcceptToMemoryPool returns fee instead of taking absurdfee parameter
OP_CHECKSIGADD
SCRIPT_VERIFY_TAPROOT in GetBlockScriptFlags
CheckSig renamed to CheckECDSASignature
Replaced PrecomputedTransactionData::m_spent_outputs CTxOut with CTxOutSign
Add walletinitinterface.h to Makefile
CHDWalletDB removed open_mode
Replaced boost::bind in smessage.cpp
Default wallets no longer created
ParticlTestFramework start_nodes, insert -wallet to extra_args
functional test extra_args are not being passed anymore
hasattr in ParticlTestFramework::start_nodes
LockAssertion is gone
Clang thread analysis can't track mutex aliases, cs_wallet on CWallet is not seen when used through CHDWallet
Used LOCK_ASSERTION from bitcoin#19970
Converted CODEOWNERS file
This fixes LockAssertion's incorrect line number reporting, with minimal changes.
PR is compared with alternatives in https://github.com/bitcoin-core/bitcoin-devwiki/wiki/AssertLockHeld-PRs