-
Notifications
You must be signed in to change notification settings - Fork 866
Add validations for imports during instantiation #8086
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
Changes from 10 commits
ea2f435
e1cef5b
8c8b209
b81af35
759b45c
08cdd58
bc151a9
6b241a7
e8e6c43
5dce759
5e4fdc5
da78b66
04e4986
580c67c
b4ac2f8
c866ae5
3746b99
ea3b41c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,5 @@ | ||
| (module | ||
| (type $0 (func (result i32))) | ||
| (export "x" (func $0)) | ||
| (func $0 (result i32) | ||
| (i32.const 5678) | ||
| ) | ||
| (type $0 (func)) | ||
| (import "env" "func" (func $fimport$0)) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did this change?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point, this looks wrong. I might have added this while I tested it and forgot to revert. I'm guessing something traps during instantiation in this test because of the import which doesn't exist as far as wasm-reduce knows. Taking a look now.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To close here, the diff here was because with the import validation, the un-reduced module was trapping on instantiation because the import doesn't exist, so the reducer was able to reduce it to a trivial module that imports (and traps). I guess this is bad because in the fuzzer we generally want to ignore imports and possibly even assume a convenient value for imports (e.g. imported functions are assumed to be no-op and can be optimized out link). To fix this and ctor-eval, I changed this PR to only enable import validation for wasm-shell / spec tests. Once we have some improvements to the way that importing logic is handled, we can remove this flag and run the validation logic unconditionally. |
||
| ) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.