-
Notifications
You must be signed in to change notification settings - Fork 814
Fuzzer: Run Two() using the Binaryen interpreter #7954
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
base: main
Are you sure you want to change the base?
Conversation
This must wait to land on fixing the issues this finds. So far I see one with imported tags. |
scripts/fuzz_opt.py
Outdated
if output == IGNORE: | ||
return | ||
|
||
if output.startswith(INSTANTIATE_ERROR): |
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.
We can probably skip the check below and immediately report a problem, since our interpreter did not trap in instantiation. It also might be worth checking the other direction by running V8 when the interpreter traps in instantiation to make sure V8 also traps in instantiation.
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.
There are host errors though which differ between VMs, like limits on array.new
size etc.
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.
Oh, but we do handle IGNORE earlier, so you are right: only deterministic things should remain at this point. I simplified it now.
Using our interpreter in addition to V8 allows our assertions to also
be checked, potentially finding more issues.
Also, we can run our interpreter on more code (e.g. V8 comparisons
are unreliable if there are NANs, due to V8's nondeterminism
differing from ours).
To make this work, fix execution-results to match fuzz_shell.js's
behavior: First instantiate both modules when running two of
them, and then run their exports (this makes it easy to see if
we error during instantiation).