-
Notifications
You must be signed in to change notification settings - Fork 942
fuzz-tests: improve fuzz-bech32
#8311
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
Open
Chand-ra
wants to merge
4
commits into
ElementsProject:master
Choose a base branch
from
Chand-ra:fuzz-bech32
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+36 Bytes
tests/fuzz/corpora/fuzz-bech32/021c6a117bbeedd66c400e03186da32e9a7700e9
Binary file not shown.
Binary file added
BIN
+192 Bytes
tests/fuzz/corpora/fuzz-bech32/0545d3433ff85218bedc9637a5d0c05a1e22e256
Binary file not shown.
Binary file added
BIN
+57 Bytes
tests/fuzz/corpora/fuzz-bech32/0f0f0f97640694464e724aa71ffa5c098b65008b
Binary file not shown.
Binary file added
BIN
+758 Bytes
tests/fuzz/corpora/fuzz-bech32/10d9edc7c9a43b56ea4f2db112e0dd1a4e7a8114
Binary file not shown.
Binary file added
BIN
+434 Bytes
tests/fuzz/corpora/fuzz-bech32/15cc9a20663aee467a3cdcf5d5c65968865c7712
Binary file not shown.
Binary file added
BIN
+23 Bytes
tests/fuzz/corpora/fuzz-bech32/1a16fa61ed2b8a2dc0359d8b50be5506749563ac
Binary file not shown.
Binary file added
BIN
+431 Bytes
tests/fuzz/corpora/fuzz-bech32/24fca7d248c865ee4f7d363e7c9f5dbcd5775d1c
Binary file not shown.
Binary file added
BIN
+22 Bytes
tests/fuzz/corpora/fuzz-bech32/3fa7dff1285a3d28f27647847b9526a1e1bdf2e6
Binary file not shown.
Binary file added
BIN
+107 Bytes
tests/fuzz/corpora/fuzz-bech32/402d79697def0e3c833480eb6ab78cc7d41bdbbb
Binary file not shown.
Binary file added
BIN
+19 Bytes
tests/fuzz/corpora/fuzz-bech32/495f3510514e3478a8a79fcce5d82d3f84070075
Binary file not shown.
Binary file added
BIN
+429 Bytes
tests/fuzz/corpora/fuzz-bech32/4b35503f2f332cf487fd5590776d51b2873c017a
Binary file not shown.
Binary file added
BIN
+33 Bytes
tests/fuzz/corpora/fuzz-bech32/4e89eea7bf3064f317ff28d942c288f9d5a325d5
Binary file not shown.
Binary file added
BIN
+81 Bytes
tests/fuzz/corpora/fuzz-bech32/4fe4ba4ea08e4ed6316a838ac1f66f0b224ac4ee
Binary file not shown.
Binary file added
BIN
+432 Bytes
tests/fuzz/corpora/fuzz-bech32/53f104823f39f6668044e80df813376661335cb8
Binary file not shown.
Binary file added
BIN
+30 Bytes
tests/fuzz/corpora/fuzz-bech32/5851450502f36b32cacf3e9f3f4624959a07bca2
Binary file not shown.
Binary file added
BIN
+21 Bytes
tests/fuzz/corpora/fuzz-bech32/5b387b8e7d89b3d33fb566ae40b465ec73c81dac
Binary file not shown.
Binary file added
BIN
+22 Bytes
tests/fuzz/corpora/fuzz-bech32/6bed2b5f2beee9be1f3c7d6fcfd51c695e87c8d0
Binary file not shown.
Binary file added
BIN
+10 Bytes
tests/fuzz/corpora/fuzz-bech32/6dba3c058e2438db8fda6dd0de27291a58d61e46
Binary file not shown.
Binary file added
BIN
+430 Bytes
tests/fuzz/corpora/fuzz-bech32/6f94c70c9b4e914460dec089ad309274f80ec36f
Binary file not shown.
Binary file added
BIN
+195 Bytes
tests/fuzz/corpora/fuzz-bech32/7442de8c9a3651195b5c7a7a110f63b5b324ffbc
Binary file not shown.
1 change: 1 addition & 0 deletions
1
tests/fuzz/corpora/fuzz-bech32/77cd1e6dbfb8955912c858a45f31b04a820a5340
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
;,;, |
Binary file added
BIN
+31 Bytes
tests/fuzz/corpora/fuzz-bech32/8bc4b2994863098ca375381b3fc3fd5dd4f86ce3
Binary file not shown.
Binary file added
BIN
+34 Bytes
tests/fuzz/corpora/fuzz-bech32/8c73f0b41bca02c3c48c299e25c7029157948557
Binary file not shown.
Binary file added
BIN
+30 Bytes
tests/fuzz/corpora/fuzz-bech32/8cbe90263b35f01fddd68ab23d67f0b815c3d898
Binary file not shown.
Binary file added
BIN
+69 Bytes
tests/fuzz/corpora/fuzz-bech32/8e17c42d3f9db95e9df7a5f81135a499f4315b79
Binary file not shown.
Binary file added
BIN
+38 Bytes
tests/fuzz/corpora/fuzz-bech32/94d2b847dcee5933470f64f3495dd7895341f8c2
Binary file not shown.
Binary file added
BIN
+440 Bytes
tests/fuzz/corpora/fuzz-bech32/9790037ff5c75a2a0b0fe08055b46540e069f84e
Binary file not shown.
Binary file added
BIN
+80 Bytes
tests/fuzz/corpora/fuzz-bech32/a8972e8a0069a0d9d2781c399b8634cdfeec252d
Binary file not shown.
1 change: 1 addition & 0 deletions
1
tests/fuzz/corpora/fuzz-bech32/ad6bcfc5fccbb6e0891d531b191b9d7bad04a4b6
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
= |
Binary file added
BIN
+82 Bytes
tests/fuzz/corpora/fuzz-bech32/aea188cbabfe863dbffff50e0434af6009dcdabc
Binary file not shown.
Binary file added
BIN
+37 Bytes
tests/fuzz/corpora/fuzz-bech32/b0ef7e6d3214a88fad8fd88683fa8c2c6c6c6867
Binary file not shown.
Binary file added
BIN
+100 Bytes
tests/fuzz/corpora/fuzz-bech32/c4dbfd68c2498802293df057225a1dad92a0be90
Binary file not shown.
1 change: 1 addition & 0 deletions
1
tests/fuzz/corpora/fuzz-bech32/c523762d2864dfb59f7bcd63826bffe0a084ae4a
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
:���/����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� |
Binary file added
BIN
+429 Bytes
tests/fuzz/corpora/fuzz-bech32/c5c1caef0ca2830611fd8666653effff8a1ac88d
Binary file not shown.
Binary file added
BIN
+6 Bytes
tests/fuzz/corpora/fuzz-bech32/d0c7f156ef754d95f87f9032d44295c12045cce1
Binary file not shown.
Binary file added
BIN
+14 Bytes
tests/fuzz/corpora/fuzz-bech32/d8b83ae8ea0a8663b1785fcbe03022cab529fa5f
Binary file not shown.
Binary file added
BIN
+25 Bytes
tests/fuzz/corpora/fuzz-bech32/d9ad1d836b42385c2cd0a0cbf0491e33ed9cab3c
Binary file not shown.
Binary file added
BIN
+28 Bytes
tests/fuzz/corpora/fuzz-bech32/dac531eca9ca0403bea12eed1021939e5dd9b8fd
Binary file not shown.
Binary file added
BIN
+80 Bytes
tests/fuzz/corpora/fuzz-bech32/dc30ceaa73c9440cd63123009ee75a988302b802
Binary file not shown.
Binary file added
BIN
+83 Bytes
tests/fuzz/corpora/fuzz-bech32/de7fe4ed0f2c485421b5faa4640bbc835ca68b54
Binary file not shown.
Binary file added
BIN
+101 Bytes
tests/fuzz/corpora/fuzz-bech32/df660f37d1acbbe7da97e771b27eae7a93fa2013
Binary file not shown.
Binary file added
BIN
+10 Bytes
tests/fuzz/corpora/fuzz-bech32/e0b2b5fee8c55d357c5c392a5a0721c211dbc74f
Binary file not shown.
Binary file added
BIN
+7 Bytes
tests/fuzz/corpora/fuzz-bech32/f13bb7f6255685e2d8ada4567c4d6e6007e2e33f
Binary file not shown.
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
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.
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.
IIUC the original code converts 5 bits to 8 bits, while now this converts 8 bits to 5 bits. This change largely invalidates the existing corpus.
Can we keep the same direction of the conversion, to maximize the corpus effectiveness?
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.
The test does perform a 8 to 5 bit conversion later in the code to perform the roundtrip check:
Do you suggest that we should swap the order of the conversions-that is, 5 to 8 first then 8 to 5?
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.
Original Code
New Code
Corpus Invalidation
Since the original corpus was created with the original code, it optimizes coverage for the 5-to-8 bit conversion. The new code reverses the direction of the initial conversion, which means all those original corpus inputs are no longer optimized for this fuzz target.
Yes there is still a 5-to-8 bit conversion later on for the round trip, but that doesn't solve the corpus invalidation since the second conversion is done on
data_out
, notdata
.