diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-05-02 13:46:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-02 13:46:10 -0700 |
commit | 1f1018564c472b75335bf4bddbf65cfebb226fb0 (patch) | |
tree | 7af259bc900a7550d3f123f8dac31319661dd58c /test | |
parent | 7addcae1ea9a09b8c82e0ad660323a42d6535baa (diff) | |
download | binaryen-1f1018564c472b75335bf4bddbf65cfebb226fb0.tar.gz binaryen-1f1018564c472b75335bf4bddbf65cfebb226fb0.tar.bz2 binaryen-1f1018564c472b75335bf4bddbf65cfebb226fb0.zip |
Validation fixes for issues noticed by afl (#988)
* properly validate block endings
* blocks with a value must not have a last element that is none
* fully validate input types to binary expressions
* validate i32.eqz/i64.eqz more carefully
* if condition must be i32
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/Oz.txt | 1 | ||||
-rw-r--r-- | test/passes/Oz.wast | 1 | ||||
-rw-r--r-- | test/passes/dce.wast | 1 | ||||
-rw-r--r-- | test/passes/local-cse.txt | 1 | ||||
-rw-r--r-- | test/passes/local-cse.wast | 1 | ||||
-rw-r--r-- | test/passes/remove-unused-brs_shrink-level=1.txt | 1 | ||||
-rw-r--r-- | test/passes/remove-unused-brs_shrink-level=1.wast | 1 | ||||
-rw-r--r-- | test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.txt | 1 | ||||
-rw-r--r-- | test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.wast | 1 |
9 files changed, 9 insertions, 0 deletions
diff --git a/test/passes/Oz.txt b/test/passes/Oz.txt index fe47b089e..c67106326 100644 --- a/test/passes/Oz.txt +++ b/test/passes/Oz.txt @@ -51,5 +51,6 @@ ) ) ) + (i32.const 0) ) ) diff --git a/test/passes/Oz.wast b/test/passes/Oz.wast index fc465669e..abfd880d5 100644 --- a/test/passes/Oz.wast +++ b/test/passes/Oz.wast @@ -52,6 +52,7 @@ ) ) ) + (i32.const 0) ) ) ) diff --git a/test/passes/dce.wast b/test/passes/dce.wast index b7d903e6b..0bed1e8ff 100644 --- a/test/passes/dce.wast +++ b/test/passes/dce.wast @@ -440,5 +440,6 @@ (i32.const 0) ) (nop) + (i32.const 0) ) ) diff --git a/test/passes/local-cse.txt b/test/passes/local-cse.txt index 9a7f4445e..266008bd4 100644 --- a/test/passes/local-cse.txt +++ b/test/passes/local-cse.txt @@ -178,6 +178,7 @@ ) ) ) + (i32.const 0) ) ) ) diff --git a/test/passes/local-cse.wast b/test/passes/local-cse.wast index b1155ce9d..26a25d236 100644 --- a/test/passes/local-cse.wast +++ b/test/passes/local-cse.wast @@ -158,6 +158,7 @@ ) ) ) + (i32.const 0) ) ) ) diff --git a/test/passes/remove-unused-brs_shrink-level=1.txt b/test/passes/remove-unused-brs_shrink-level=1.txt index 923d45ae9..1f837ab0c 100644 --- a/test/passes/remove-unused-brs_shrink-level=1.txt +++ b/test/passes/remove-unused-brs_shrink-level=1.txt @@ -43,6 +43,7 @@ (i32.const 27) ) ) + (i32.const 0) ) (func $join-br_ifs (type $1) (block $out diff --git a/test/passes/remove-unused-brs_shrink-level=1.wast b/test/passes/remove-unused-brs_shrink-level=1.wast index e48ced178..c0ec7d4cd 100644 --- a/test/passes/remove-unused-brs_shrink-level=1.wast +++ b/test/passes/remove-unused-brs_shrink-level=1.wast @@ -36,6 +36,7 @@ (i32.const 27) ) ) + (i32.const 0) ) (func $join-br_ifs (block $out diff --git a/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.txt b/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.txt index a4ba5997d..51c096755 100644 --- a/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.txt +++ b/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.txt @@ -43,6 +43,7 @@ (i32.const 1) ) ) + (i32.const 0) ) (func $join-br_ifs (type $1) (block $out diff --git a/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.wast b/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.wast index e48ced178..c0ec7d4cd 100644 --- a/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.wast +++ b/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.wast @@ -36,6 +36,7 @@ (i32.const 27) ) ) + (i32.const 0) ) (func $join-br_ifs (block $out |