diff options
author | Ben Smith <binji@chromium.org> | 2019-07-24 18:19:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-24 18:19:09 -0700 |
commit | 39970f8270fe869c1aec144d468811c71a5cc39c (patch) | |
tree | 81a5154a2dd2ca2da987150771b4e4a711c26ad0 /test/regress | |
parent | 3275a872d4937937417eba7c1bc85034041a0e68 (diff) | |
download | wabt-39970f8270fe869c1aec144d468811c71a5cc39c.tar.gz wabt-39970f8270fe869c1aec144d468811c71a5cc39c.tar.bz2 wabt-39970f8270fe869c1aec144d468811c71a5cc39c.zip |
Fix fuzzing bugs in wat2wasm (#1129)
* More bugs w/ bad strings (newlines and bad escapes)
* Incorrect hex-float exponent
* Update fuzz-wat2wasm.sh to enable features
Diffstat (limited to 'test/regress')
-rw-r--r-- | test/regress/regress-31.txt | 3 | ||||
-rw-r--r-- | test/regress/regress-32.txt | 8 | ||||
-rw-r--r-- | test/regress/regress-33.txt | 11 |
3 files changed, 20 insertions, 2 deletions
diff --git a/test/regress/regress-31.txt b/test/regress/regress-31.txt index 404f7ad2..f72500e3 100644 --- a/test/regress/regress-31.txt +++ b/test/regress/regress-31.txt @@ -6,8 +6,7 @@ out/test/regress/regress-31.txt:3:2: error: newline in string " ^ -out/test/regress/regress-31.txt:3:1: error: unexpected token " -"", expected a module field or a module. +out/test/regress/regress-31.txt:4:1: error: unexpected token "Invalid", expected a module field or a module. " ^ ;;; STDERR ;;) diff --git a/test/regress/regress-32.txt b/test/regress/regress-32.txt new file mode 100644 index 00000000..ba7eeeb9 --- /dev/null +++ b/test/regress/regress-32.txt @@ -0,0 +1,8 @@ +;;; TOOL: wat2wasm +;;; ERROR: 1 +(func f32.const 0xcab.ba6ep41e100) +(;; STDERR ;;; +out/test/regress/regress-32.txt:3:17: error: unexpected token "0xcab.ba6ep41e100", expected a numeric literal (e.g. 123, -45, 6.7e8). +(func f32.const 0xcab.ba6ep41e100) + ^^^^^^^^^^^^^^^^^ +;;; STDERR ;;) diff --git a/test/regress/regress-33.txt b/test/regress/regress-33.txt new file mode 100644 index 00000000..27bd5c8c --- /dev/null +++ b/test/regress/regress-33.txt @@ -0,0 +1,11 @@ +;;; TOOL: wat2wasm +;;; ERROR: 1 +(data "\d") +(;; STDERR ;;; +out/test/regress/regress-33.txt:3:8: error: bad escape "\d" +(data "\d") + ^^ +out/test/regress/regress-33.txt:3:7: error: unexpected token Invalid, expected ). +(data "\d") + ^^^^ +;;; STDERR ;;) |