-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve parsing of invalid annotations
This had been crashing even with annotations disabled. Adds a regression test. This was missed in #2001 when updating the parser to match the updated spec (WebAssembly/spec#1499). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53935
- Loading branch information
Showing
2 changed files
with
13 additions
and
1 deletion.
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,12 @@ | ||
;;; TOOL: wat2wasm | ||
;;; ERROR: 1 | ||
(@"annotation | ||
(;; STDERR ;;; | ||
out/test/regress/bad-annotation.txt:3:1: error: annotations not enabled: "annotation | ||
(@"annotation | ||
^^^^^^^^^^^^^ | ||
out/test/regress/bad-annotation.txt:3:1: error: unexpected token "Invalid", expected a module field or a module. | ||
(@"annotation | ||
^^^^^^^^^^^^^ | ||
;;; STDERR ;;) |