-
Notifications
You must be signed in to change notification settings - Fork 836
Fuzzer: Do not emit huge and possibly non-validating tables #6288
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2c8d2c0
fix
kripken 401417b
fix
kripken 523897f
fix
kripken 74d6341
fix
kripken 1b762b2
format
kripken cb927a0
fix
kripken 54a4b47
format
kripken 06b3bbb
outside
kripken 04e573c
comment
kripken 35fc5e9
comment.fix
kripken 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
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.
I am confused by this comment. Would the segment fail to validate or trap? It can't do both at the same time.
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.
A segment with a huge but valid offset that is larger than kMaxSize will trap. But we fail to validate if we raise
initialto such sizes. This is due to the max size being 32 bits but Address being 64 bits. Perhaps another way to fix this is to refactor Address to be 32 bits in wasm32, but I think we had a reason for the current approach.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.
I see, so big segment offsets lead to traps and big tables lead to validation errors. Makes sense. I guess I don't understand the connection between them, though. Is the fuzzer generating segment offsets and table sizes based off of each other?
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.
Yes, the code adjacent to this (right above it) increases
initialbased on the segments it sees, that is, it is trying to avoid a trap by ensuring a big-enough initial size.