-
Notifications
You must be signed in to change notification settings - Fork 827
Fuzzer: Add call-ref, call-ref-catch imports #7137
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
Conversation
| target = callExportImportName; | ||
| } else if (type == Type::i32) { | ||
| target = callExportCatchImportName; | ||
| if (type == Type::i32) { |
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 comment below that says "This never traps.. but we do still want to avoid trapping..." seems to contradict itself about whether traps are possible. Can we clarify it?
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.
Clarified. The issue is swallowing traps: we always swallow them, but still prefer not to have any trap at all.
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.
Should this also say "exceptions" instead of "traps"?
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.
😆 yeah, sorry, it seems I have difficulty not using "trap" as a catchall for "error". fixed.
Co-authored-by: Thomas Lively <tlively123@gmail.com>
Co-authored-by: Thomas Lively <tlively123@gmail.com>
Co-authored-by: Thomas Lively <tlively123@gmail.com>
Co-authored-by: Thomas Lively <tlively123@gmail.com>
Co-authored-by: Thomas Lively <tlively123@gmail.com>
Similar to
call-export*, these imports call a wasm function from outside themodule. The difference is that we send a function reference for them to call
(rather than an export index).
This gives more coverage, first by sending a ref from wasm to JS, and also
since we will now try to call anything that is sent. Exports, in comparison,
are filtered by the fuzzer to things that JS can handle, so this may lead to
more traps, but maybe also some new situations. This also leads to adding
more logic to
execution-results.hto model JS trapping properly.fuzz_shell.jsis refactored to allow sharing code betweencall-export*andcall-ref*.