-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail deterministically on invalid modules (#1969)
Inspired by bytecodealliance/wasmtime#9947 this helps keep the output of `wasm-tools validate` more deterministic by ensuring that the first error is reported instead of any error within a module.
- Loading branch information
1 parent
31c5811
commit 645df68
Showing
3 changed files
with
133 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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 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,105 @@ | ||
;; FAIL: validate % | ||
|
||
(module | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
(func (result i32)) | ||
) |
This file contains 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,4 @@ | ||
error: func 0 failed to validate | ||
|
||
Caused by: | ||
0: type mismatch: expected i32 but nothing on stack (at offset 0x7d) |