fuzz: bolster ExtractDestination(s) checks #20772
pull mjdietzx wants to merge 1 commits into bitcoin:master from mjdietzx:test-fuzz-extract-destinations changing 1 files +38 −10-
mjdietzx commented at 3:31 pm on December 26, 2020: contributor
-
DrahtBot added the label Tests on Dec 26, 2020
-
DrahtBot commented at 6:05 pm on December 26, 2020: member
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Conflicts
No conflicts as of last run.
-
mjdietzx force-pushed on Dec 26, 2020
-
DrahtBot added the label Needs rebase on Dec 26, 2020
-
mjdietzx force-pushed on Dec 27, 2020
-
DrahtBot removed the label Needs rebase on Dec 27, 2020
-
mjdietzx force-pushed on Dec 27, 2020
-
in src/test/fuzz/script.cpp:62 in 0a7f327027 outdated
67- (void)InferDescriptor(script, signing_provider); 68- 69- (void)IsSegWitOutput(signing_provider, script); 70- 71- (void)IsSolvable(signing_provider, script); 72+ if (!ExtractDestinations(script, type_ret, addresses, required_ret)) {
sipa commented at 5:02 am on December 27, 2020:This code could be significantly more efficient by just callingExtractDestination
(s
) once each, caching the result, and then making assertions on those results.sipa commented at 5:03 am on December 27, 2020: memberConcept ACK, but probably not worth spending too much time on ifExtractDestinations
is going away anyway.practicalswift commented at 10:39 pm on December 27, 2020: contributorConcept ACK
Thanks for improving the fuzzing harnesses!
mjdietzx force-pushed on Dec 29, 2020fuzz: bolster ExtractDestination(s) checks a29f522ba4mjdietzx force-pushed on Jan 3, 2021in src/test/fuzz/script.cpp:75 in a29f522ba4
80+ type_ret == TxoutType::NONSTANDARD || 81+ type_ret == TxoutType::NULL_DATA); 82+ } 83+ } else { 84+ assert(required_ret >= 1 && required_ret <= 16); 85+ assert((unsigned long)required_ret == addresses.size());
practicalswift commented at 10:36 pm on March 20, 2021:Nit:size_t
instead ofunsigned long
to match the return type ofsize()
?practicalswift commented at 10:38 pm on March 20, 2021: contributorTested ACK a29f522ba4aa71582b54025c5682b4c1687ae9f3
Thanks for adding assertions to existing fuzzing harnesses: that’s a great way to improve the value provided by them!
Feel free to ignore nit.
adamjonas commented at 5:13 pm on April 27, 2021: memberTested a29f522ba4aa71582b54025c5682b4c1687ae9f3 withFUZZ=script src/test/fuzz/fuzz qa-assets/fuzz_seed_corpus/script
. No problems.MarcoFalke merged this on Apr 28, 2021MarcoFalke closed this on Apr 28, 2021
sidhujag referenced this in commit 095694c116 on Apr 28, 2021gwillen referenced this in commit ae471dc6a5 on Jun 1, 2022DrahtBot locked this on Aug 18, 2022
github-metadata-mirror
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-11-17 15:12 UTC
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-11-17 15:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me