-
Notifications
You must be signed in to change notification settings - Fork 38.7k
fuzz: Add fuzzer for ConditionStack #18127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Includes comments added by Pieter Wuille.
This optimization was first suggested by Sergio Demian Lerner in https://bitslog.wordpress.com/2017/04/17/new-quadratic-delays-in-bitcoin-scripts/. The implementation follows the suggested approach there, but with a slightly simpler representation.
Contributor
|
Concept ACK: thanks for adding fuzzing harnesses. Nice to see the new PR title prefix |
Contributor
|
Concept ACK - I take it you don't mean for this to be merged but rather to prove the point? |
jonatack
reviewed
Feb 12, 2020
Member
jonatack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK, tested
(pr/18127)$ src/test/fuzz/script_condition_stack
INFO: Seed: 3449044402
INFO: Loaded 1 modules (510932 inline 8-bit counters): 510932 [0x5642d9dc1678, 0x5642d9e3e24c),
INFO: Loaded 1 PC tables (510932 PCs): 510932 [0x5642d9e3e250,0x5642da609f90),
INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
INFO: A corpus is not provided, starting from an empty corpus
#2 INITED cov: 177 ft: 178 corp: 1/1b exec/s: 0 rss: 117Mb
#3 NEW cov: 179 ft: 242 corp: 2/59b exec/s: 0 rss: 117Mb L: 58/58 MS: 1 InsertRepeatedBytes-
#4 NEW cov: 179 ft: 290 corp: 3/90b exec/s: 0 rss: 117Mb L: 31/58 MS: 1 EraseBytes-
#5 NEW cov: 179 ft: 291 corp: 4/121b exec/s: 0 rss: 117Mb L: 31/58 MS: 1 ChangeByte-
#6 REDUCE cov: 179 ft: 291 corp: 4/111b exec/s: 0 rss: 117Mb L: 21/58 MS: 1 EraseBytes-
#7 REDUCE cov: 179 ft: 291 corp: 4/99b exec/s: 0 rss: 117Mb L: 19/58 MS: 1 EraseBytes-
NEW_FUNC[0/10]: 0x5642d6f4b1d0 in std::_Bvector_base<std::allocator<bool> >::_Bvector_impl::_M_end_addr() const /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_bvector.h:487
NEW_FUNC[1/10]: 0x5642d6f4b880 in std::vector<bool, std::allocator<bool> >::_M_insert_aux(std::_Bit_iterator, bool) /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/vector.tcc:843
.../...
#24489 REDUCE cov: 438 ft: 2252 corp: 118/178Kb exec/s: 9 rss: 264Mb L: 2263/4096 MS: 2 InsertRepeatedBytes-EraseBytes-
Contributor
|
@MarcoFalke Why the close? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This takes the ConditionStack from d0e8f4d and e6e622e and checks that they behave equally with a fuzz test.