-
Notifications
You must be signed in to change notification settings - Fork 827
[EH] Fuzz throws from JS #7027
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
[EH] Fuzz throws from JS #7027
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
e11f7ae
start
kripken a494c2a
buildz
kripken b3759d9
buildz.for.real
kripken d8c300d
call
kripken c002b78
oops
kripken bcbae0d
fix
kripken 33d4732
simpl
kripken 631a20f
fix
kripken 13e8e0c
fix
kripken 77c879d
fix
kripken fc34b32
update
kripken 1a0ae63
work
kripken 73117d2
work
kripken 383059a
text
kripken c9689df
update existing test: we now differentiate between imports from fuzzi…
kripken ea1f8ee
feedback
kripken cd292a8
test
kripken 3bbec24
avoid hardcoded logging import names
kripken b6fa6bc
format
kripken be58b10
fix
kripken 2b266df
update
kripken d6cbcc9
be more flexible
kripken 043a76a
fix some tests, which misused logging
kripken e983c3a
update outputs
kripken 3b0bb3f
use proper log-i32/f32 names in tests
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
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
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
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
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,39 @@ | ||
| ;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited. | ||
|
|
||
| ;; RUN: wasm-opt %s -all --fuzz-exec -o /dev/null 2>&1 | filecheck %s | ||
|
|
||
| ;; Test the fuzzing-support module imports. | ||
|
|
||
| (module | ||
| (import "fuzzing-support" "log-i32" (func $log-i32 (param i32))) | ||
| (import "fuzzing-support" "log-f64" (func $log-f64 (param f64))) | ||
|
|
||
| (import "fuzzing-support" "throw" (func $throw)) | ||
|
|
||
| ;; CHECK: [fuzz-exec] calling logging | ||
| ;; CHECK-NEXT: [LoggingExternalInterface logging 42] | ||
| ;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159] | ||
| (func $logging (export "logging") | ||
| (call $log-i32 | ||
| (i32.const 42) | ||
| ) | ||
| (call $log-f64 | ||
| (f64.const 3.14159) | ||
| ) | ||
| ) | ||
|
|
||
| ;; CHECK: [fuzz-exec] calling throwing | ||
| ;; CHECK-NEXT: [exception thrown: __private ()] | ||
| ;; CHECK-NEXT: warning: no passes specified, not doing any work | ||
| (func $throwing (export "throwing") | ||
| (call $throw) | ||
| ) | ||
| ) | ||
| ;; CHECK: [fuzz-exec] calling logging | ||
| ;; CHECK-NEXT: [LoggingExternalInterface logging 42] | ||
| ;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159] | ||
|
|
||
| ;; CHECK: [fuzz-exec] calling throwing | ||
| ;; CHECK-NEXT: [exception thrown: __private ()] | ||
| ;; CHECK-NEXT: [fuzz-exec] comparing logging | ||
| ;; CHECK-NEXT: [fuzz-exec] comparing throwing |
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
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 |
|---|---|---|
| @@ -1,35 +1,35 @@ | ||
| Metrics | ||
| total | ||
| [exports] : 23 | ||
| [funcs] : 34 | ||
| [exports] : 50 | ||
| [funcs] : 72 | ||
| [globals] : 9 | ||
| [imports] : 4 | ||
| [memories] : 1 | ||
| [memory-data] : 2 | ||
| [table-data] : 6 | ||
| [table-data] : 25 | ||
| [tables] : 1 | ||
| [tags] : 0 | ||
| [total] : 4303 | ||
| [vars] : 100 | ||
| Binary : 355 | ||
| Block : 684 | ||
| Break : 149 | ||
| Call : 219 | ||
| [total] : 4381 | ||
| [vars] : 218 | ||
| Binary : 335 | ||
| Block : 725 | ||
| Break : 120 | ||
| Call : 210 | ||
| CallIndirect : 23 | ||
| Const : 643 | ||
| Drop : 50 | ||
| GlobalGet : 367 | ||
| GlobalSet : 258 | ||
| If : 206 | ||
| Load : 78 | ||
| LocalGet : 339 | ||
| LocalSet : 236 | ||
| Loop : 93 | ||
| Nop : 41 | ||
| RefFunc : 6 | ||
| Return : 45 | ||
| Select : 41 | ||
| Store : 36 | ||
| Switch : 1 | ||
| Unary : 304 | ||
| Unreachable : 129 | ||
| Const : 692 | ||
| Drop : 64 | ||
| GlobalGet : 391 | ||
| GlobalSet : 298 | ||
| If : 236 | ||
| Load : 71 | ||
| LocalGet : 285 | ||
| LocalSet : 209 | ||
| Loop : 76 | ||
| Nop : 63 | ||
| RefFunc : 25 | ||
| Return : 60 | ||
| Select : 23 | ||
| Store : 29 | ||
| Switch : 2 | ||
| Unary : 293 | ||
| Unreachable : 151 |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Can we add an
else { WASM_UNREACHABLE(...after this to catch problems earlier if we add a new import that does not follow any of these schemes?