From 31f475fa25af6c9576c08fdb4263e51226f40651 Mon Sep 17 00:00:00 2001 From: rossberg-chromium Date: Mon, 15 May 2017 17:16:53 +0200 Subject: [PATCH 1/3] [interpreter] Support quoted module definitions --- interpreter/host/js.ml | 18 +- interpreter/host/run.ml | 9 +- interpreter/text/arrange.ml | 16 +- interpreter/text/lexer.mll | 5 +- interpreter/text/parser.mly | 11 +- interpreter/text/script.ml | 1 + test/core/align.wast | 33 +++ test/core/binary.wast | 34 +-- test/core/custom_section.wast | 14 +- test/core/globals.wast | 8 +- test/core/load-align-0.fail.wast | 1 - test/core/load-align-big.fail.wast | 1 - test/core/load-align-odd.fail.wast | 1 - test/core/store-align-0.fail.wast | 1 - test/core/store-align-big.fail.wast | 1 - test/core/store-align-odd.fail.wast | 1 - test/core/utf8-custom-section-id.wast | 352 +++++++++++++------------- test/core/utf8-import-field.wast | 352 +++++++++++++------------- test/core/utf8-import-module.wast | 352 +++++++++++++------------- 19 files changed, 628 insertions(+), 583 deletions(-) create mode 100644 test/core/align.wast delete mode 100644 test/core/load-align-0.fail.wast delete mode 100644 test/core/load-align-big.fail.wast delete mode 100644 test/core/load-align-odd.fail.wast delete mode 100644 test/core/store-align-0.fail.wast delete mode 100644 test/core/store-align-big.fail.wast delete mode 100644 test/core/store-align-odd.fail.wast diff --git a/interpreter/host/js.ml b/interpreter/host/js.ml index 1d66dc18d9..6b5f1f96f4 100644 --- a/interpreter/host/js.ml +++ b/interpreter/host/js.ml @@ -305,12 +305,13 @@ let of_literal lit = | Values.F32 z -> of_float (F32.to_float z) | Values.F64 z -> of_float (F64.to_float z) -let of_definition def = - let bs = - match def.it with - | Textual m -> Encode.encode m - | Encoded (_, bs) -> bs - in of_bytes bs +let rec of_definition def = + match def.it with + | Textual m -> of_bytes (Encode.encode m) + | Encoded (_, bs) -> of_bytes bs + | Quoted (_, s) -> + try of_definition (Parse.string_to_module s) with Parse.Syntax _ -> + of_bytes "" let of_wrapper mods x_opt name wrap_action wrap_assertion at = let x = of_var_opt mods x_opt in @@ -377,11 +378,12 @@ let of_command mods cmd = ":" ^ string_of_int cmd.at.left.line ^ "\n" ^ match cmd.it with | Module (x_opt, def) -> - let m = + let rec unquote def = match def.it with | Textual m -> m | Encoded (_, bs) -> Decode.decode "binary" bs - in bind mods x_opt m; + | Quoted (_, s) -> unquote (Parse.string_to_module s) + in bind mods x_opt (unquote def); "let " ^ current_var mods ^ " = instance(" ^ of_definition def ^ ");\n" ^ (if x_opt = None then "" else "let " ^ of_var_opt mods x_opt ^ " = " ^ current_var mods ^ ";\n") diff --git a/interpreter/host/run.ml b/interpreter/host/run.ml index 1f7a9c22c7..bfdb7bfc76 100644 --- a/interpreter/host/run.ml +++ b/interpreter/host/run.ml @@ -265,12 +265,16 @@ let lookup_registry module_name item_name _t = (* Running *) -let run_definition def = +let rec run_definition def = match def.it with | Textual m -> m | Encoded (name, bs) -> trace "Decoding..."; Decode.decode name bs + | Quoted (_, s) -> + trace "Parsing quote..."; + let def' = Parse.string_to_module s in + run_definition def' let run_action act = match act.it with @@ -316,7 +320,8 @@ let run_assertion ass = trace "Asserting malformed..."; (match ignore (run_definition def) with | exception Decode.Code (_, msg) -> assert_message ass.at "decoding" msg re - | _ -> Assert.error ass.at "expected decoding error" + | exception Parse.Syntax (_, msg) -> assert_message ass.at "parsing" msg re + | _ -> Assert.error ass.at "expected decoding/parsing error" ) | AssertInvalid (def, re) -> diff --git a/interpreter/text/arrange.ml b/interpreter/text/arrange.ml index 3eb2a0661f..ee0a49d7ce 100644 --- a/interpreter/text/arrange.ml +++ b/interpreter/text/arrange.ml @@ -364,7 +364,7 @@ let module_with_var_opt x_opt m = ) let binary_module_with_var_opt x_opt bs = - Node ("module" ^ var_opt x_opt, break_bytes bs) + Node ("module" ^ var_opt x_opt ^ " binary", break_bytes bs) let module_ = module_with_var_opt None @@ -378,20 +378,24 @@ let literal lit = | Values.F32 z -> Node ("f32.const " ^ F32.to_string z, []) | Values.F64 z -> Node ("f64.const " ^ F64.to_string z, []) -let definition mode x_opt def = +let rec definition mode x_opt def = match mode, def.it with | `Textual, _ | `Original, Textual _ -> - let m = + let rec unquote def = match def.it with | Textual m -> m | Encoded (_, bs) -> Decode.decode "" bs - in module_with_var_opt x_opt m + | Quoted (_, s) -> unquote (Parse.string_to_module s) + in module_with_var_opt x_opt (unquote def) | `Binary, _ | `Original, Encoded _ -> - let bs = + let rec unquote bs = match def.it with | Textual m -> Encode.encode m | Encoded (_, bs) -> bs - in binary_module_with_var_opt x_opt bs + | Quoted (_, s) -> unquote (Parse.string_to_module s) + in binary_module_with_var_opt x_opt (unquote def) + | `Original, Quoted (_, s) -> + definition mode x_opt (Parse.string_to_module s) let access x_opt n = String.concat " " [var_opt x_opt; name n] diff --git a/interpreter/text/lexer.mll b/interpreter/text/lexer.mll index 70f4a9c34e..8fe73e7c31 100644 --- a/interpreter/text/lexer.mll +++ b/interpreter/text/lexer.mll @@ -291,7 +291,6 @@ rule token = parse | "result" { RESULT } | "local" { LOCAL } | "global" { GLOBAL } - | "module" { MODULE } | "table" { TABLE } | "memory" { MEMORY } | "elem" { ELEM } @@ -300,6 +299,10 @@ rule token = parse | "import" { IMPORT } | "export" { EXPORT } + | "module" { MODULE } + | "binary" { BIN } + | "quote" { QUOTE } + | "script" { SCRIPT } | "register" { REGISTER } | "invoke" { INVOKE } diff --git a/interpreter/text/parser.mly b/interpreter/text/parser.mly index 31db274ebd..6ec9df1e56 100644 --- a/interpreter/text/parser.mly +++ b/interpreter/text/parser.mly @@ -160,10 +160,11 @@ let inline_type (c : context) ty at = %token CALL CALL_INDIRECT RETURN %token GET_LOCAL SET_LOCAL TEE_LOCAL GET_GLOBAL SET_GLOBAL %token LOAD STORE OFFSET_EQ_NAT ALIGN_EQ_NAT -%token CONST UNARY BINARY COMPARE CONVERT +%token CONST UNARY BINARY TEST COMPARE CONVERT %token UNREACHABLE CURRENT_MEMORY GROW_MEMORY %token FUNC START TYPE PARAM RESULT LOCAL GLOBAL -%token MODULE TABLE ELEM MEMORY DATA OFFSET IMPORT EXPORT TABLE +%token TABLE ELEM MEMORY DATA OFFSET IMPORT EXPORT TABLE +%token MODULE BIN QUOTE %token SCRIPT REGISTER INVOKE GET %token ASSERT_MALFORMED ASSERT_INVALID ASSERT_SOFT_INVALID ASSERT_UNLINKABLE %token ASSERT_RETURN ASSERT_RETURN_CANONICAL_NAN ASSERT_RETURN_ARITHMETIC_NAN ASSERT_TRAP ASSERT_EXHAUSTION @@ -653,8 +654,10 @@ module_fields : module_ : | LPAR MODULE script_var_opt module_fields RPAR { $3, Textual ($4 (empty_context ()) @@ at ()) @@ at () } - | LPAR MODULE script_var_opt TEXT text_list RPAR - { $3, Encoded ("binary", $4 ^ $5) @@ at() } + | LPAR MODULE script_var_opt BIN text_list RPAR + { $3, Encoded ("binary", $5) @@ at() } + | LPAR MODULE script_var_opt QUOTE text_list RPAR + { $3, Quoted ("quote", $5) @@ at() } /* Scripts */ diff --git a/interpreter/text/script.ml b/interpreter/text/script.ml index 11032f1f6a..ca83025408 100644 --- a/interpreter/text/script.ml +++ b/interpreter/text/script.ml @@ -4,6 +4,7 @@ type definition = definition' Source.phrase and definition' = | Textual of Ast.module_ | Encoded of string * string + | Quoted of string * string type action = action' Source.phrase and action' = diff --git a/test/core/align.wast b/test/core/align.wast new file mode 100644 index 0000000000..133b501d7a --- /dev/null +++ b/test/core/align.wast @@ -0,0 +1,33 @@ +(assert_malformed + (module quote + "(module (memory 0) (func (drop (i64.load align=0 (i32.const 0)))))" + ) + "alignment" +) +(assert_malformed + (module quote + "(module (memory 0) (func (drop (i64.load align=7 (i32.const 0)))))" + ) + "alignment" +) +(assert_invalid + (module (memory 0) (func (drop (i64.load align=16 (i32.const 0))))) + "alignment" +) + +(assert_malformed + (module quote + "(module (memory 0) (func (i64.store align=0 (i32.const 0) (i64.const 0))))" + ) + "alignment" +) +(assert_malformed + (module quote + "(module (memory 0) (func (i64.store align=5 (i32.const 0) (i64.const 0))))" + ) + "alignment" +) +(assert_invalid + (module (memory 0) (func (i64.store align=16 (i32.const 0) (i64.const 0)))) + "alignment" +) diff --git a/test/core/binary.wast b/test/core/binary.wast index 3902239655..9ea0b6342f 100644 --- a/test/core/binary.wast +++ b/test/core/binary.wast @@ -1,19 +1,19 @@ -(module "\00asm\01\00\00\00") -(module "\00asm" "\01\00\00\00") -(module $M1 "\00asm\01\00\00\00") -(module $M2 "\00asm" "\01\00\00\00") +(module binary "\00asm\01\00\00\00") +(module binary "\00asm" "\01\00\00\00") +(module $M1 binary "\00asm\01\00\00\00") +(module $M2 binary "\00asm" "\01\00\00\00") -(assert_malformed (module "") "unexpected end") -(assert_malformed (module "\01") "unexpected end") -(assert_malformed (module "\00as") "unexpected end") -(assert_malformed (module "asm\00") "magic header not detected") -(assert_malformed (module "msa\00") "magic header not detected") -(assert_malformed (module "msa\00\01\00\00\00") "magic header not detected") -(assert_malformed (module "msa\00\00\00\00\01") "magic header not detected") +(assert_malformed (module binary "") "unexpected end") +(assert_malformed (module binary "\01") "unexpected end") +(assert_malformed (module binary "\00as") "unexpected end") +(assert_malformed (module binary "asm\00") "magic header not detected") +(assert_malformed (module binary "msa\00") "magic header not detected") +(assert_malformed (module binary "msa\00\01\00\00\00") "magic header not detected") +(assert_malformed (module binary "msa\00\00\00\00\01") "magic header not detected") -(assert_malformed (module "\00asm") "unexpected end") -(assert_malformed (module "\00asm\01") "unexpected end") -(assert_malformed (module "\00asm\01\00\00") "unexpected end") -(assert_malformed (module "\00asm\0d\00\00\00") "unknown binary version") -(assert_malformed (module "\00asm\0e\00\00\00") "unknown binary version") -(assert_malformed (module "\00asm\00\00\00\01") "unknown binary version") +(assert_malformed (module binary "\00asm") "unexpected end") +(assert_malformed (module binary "\00asm\01") "unexpected end") +(assert_malformed (module binary "\00asm\01\00\00") "unexpected end") +(assert_malformed (module binary "\00asm\0d\00\00\00") "unknown binary version") +(assert_malformed (module binary "\00asm\0e\00\00\00") "unknown binary version") +(assert_malformed (module binary "\00asm\00\00\00\01") "unknown binary version") diff --git a/test/core/custom_section.wast b/test/core/custom_section.wast index f087a9d2d9..482d6d5ee5 100644 --- a/test/core/custom_section.wast +++ b/test/core/custom_section.wast @@ -1,4 +1,4 @@ -(module +(module binary "\00asm" "\01\00\00\00" "\00\24\10" "a custom section" "this is the payload" "\00\20\10" "a custom section" "this is payload" @@ -8,7 +8,7 @@ "\00\24\10" "\00\00custom sectio\00" "this is the payload" ) -(module +(module binary "\00asm" "\01\00\00\00" "\00\0e\06" "custom" "payload" "\00\0e\06" "custom" "payload" @@ -44,7 +44,7 @@ "\00\0e\06" "custom" "payload" ) -(module +(module binary "\00asm" "\01\00\00\00" "\01\07\01\60\02\7f\7f\01\7f" ;; type section "\00\1a\06" "custom" "this is the payload" ;; custom section @@ -55,7 +55,7 @@ ) (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\00" ) @@ -63,7 +63,7 @@ ) (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\26\10" "a custom section" "this is the payload" ) @@ -71,7 +71,7 @@ ) (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\25\10" "a custom section" "this is the payload" "\00\24\10" "a custom section" "this is the payload" @@ -80,7 +80,7 @@ ) (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\01\07\01\60\02\7f\7f\01\7f" ;; type section "\00\25\10" "a custom section" "this is the payload" ;; invalid length! diff --git a/test/core/globals.wast b/test/core/globals.wast index 9eb594057d..b8f9c8f549 100644 --- a/test/core/globals.wast +++ b/test/core/globals.wast @@ -125,7 +125,7 @@ (import "spectest" "global" (global i32)) ) (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\94\80\80\80\00" ;; import section "\01" ;; length 1 @@ -138,7 +138,7 @@ "invalid mutability" ) (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\94\80\80\80\00" ;; import section "\01" ;; length 1 @@ -155,7 +155,7 @@ (global i32 (i32.const 0)) ) (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\06\86\80\80\80\00" ;; global section "\01" ;; length 1 @@ -167,7 +167,7 @@ "invalid mutability" ) (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\06\86\80\80\80\00" ;; global section "\01" ;; length 1 diff --git a/test/core/load-align-0.fail.wast b/test/core/load-align-0.fail.wast deleted file mode 100644 index fb8ec030e8..0000000000 --- a/test/core/load-align-0.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 0) (func (drop (i64.load align=0 (i32.const 0))))) diff --git a/test/core/load-align-big.fail.wast b/test/core/load-align-big.fail.wast deleted file mode 100644 index ec5eedd28e..0000000000 --- a/test/core/load-align-big.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 0) (func (drop (i64.load align=16 (i32.const 0))))) diff --git a/test/core/load-align-odd.fail.wast b/test/core/load-align-odd.fail.wast deleted file mode 100644 index 2132836c8c..0000000000 --- a/test/core/load-align-odd.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 0) (func (drop (i64.load align=5 (i32.const 0))))) diff --git a/test/core/store-align-0.fail.wast b/test/core/store-align-0.fail.wast deleted file mode 100644 index 02d837a897..0000000000 --- a/test/core/store-align-0.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 0) (func (i64.store align=0 (i32.const 0) (i64.const 0)))) diff --git a/test/core/store-align-big.fail.wast b/test/core/store-align-big.fail.wast deleted file mode 100644 index 812cd9ca20..0000000000 --- a/test/core/store-align-big.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 0) (func (i64.store align=16 (i32.const 0) (i64.const 0)))) diff --git a/test/core/store-align-odd.fail.wast b/test/core/store-align-odd.fail.wast deleted file mode 100644 index 19201b404d..0000000000 --- a/test/core/store-align-odd.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 0) (func (i64.store align=6 (i32.const 0) (i64.const 0)))) diff --git a/test/core/utf8-custom-section-id.wast b/test/core/utf8-custom-section-id.wast index 040c3ea379..129d2b9139 100644 --- a/test/core/utf8-custom-section-id.wast +++ b/test/core/utf8-custom-section-id.wast @@ -4,7 +4,7 @@ ;; encoding starts with (first) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\02" ;; custom section "\01\80" ;; "\80" @@ -14,7 +14,7 @@ ;; encoding starts with (0x8f) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\02" ;; custom section "\01\8f" ;; "\8f" @@ -24,7 +24,7 @@ ;; encoding starts with (0x90) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\02" ;; custom section "\01\90" ;; "\90" @@ -34,7 +34,7 @@ ;; encoding starts with (0x9f) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\02" ;; custom section "\01\9f" ;; "\9f" @@ -44,7 +44,7 @@ ;; encoding starts with (0xa0) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\02" ;; custom section "\01\a0" ;; "\a0" @@ -54,7 +54,7 @@ ;; encoding starts with (last) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\02" ;; custom section "\01\bf" ;; "\bf" @@ -66,7 +66,7 @@ ;; 2-byte sequence contains 3 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\c2\80\80" ;; "\c2\80\80" @@ -76,7 +76,7 @@ ;; 2-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\02" ;; custom section "\01\c2" ;; "\c2" @@ -86,7 +86,7 @@ ;; 2-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\c2\2e" ;; "\c2." @@ -98,7 +98,7 @@ ;; overlong encoding after 0xc0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\c0\80" ;; "\c0\80" @@ -108,7 +108,7 @@ ;; overlong encoding after 0xc0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\c0\bf" ;; "\c0\bf" @@ -118,7 +118,7 @@ ;; overlong encoding after 0xc1 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\c1\80" ;; "\c1\80" @@ -128,7 +128,7 @@ ;; overlong encoding after 0xc1 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\c1\bf" ;; "\c1\bf" @@ -138,7 +138,7 @@ ;; byte after (first) 2-byte prefix not a contination byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\c2\00" ;; "\c2\00" @@ -148,7 +148,7 @@ ;; byte after (first) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\c2\7f" ;; "\c2\7f" @@ -158,7 +158,7 @@ ;; byte after (first) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\c2\c0" ;; "\c2\c0" @@ -168,7 +168,7 @@ ;; byte after (first) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\c2\fd" ;; "\c2\fd" @@ -178,7 +178,7 @@ ;; byte after (last) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\df\00" ;; "\df\00" @@ -188,7 +188,7 @@ ;; byte after (last) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\df\7f" ;; "\df\7f" @@ -198,7 +198,7 @@ ;; byte after (last) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\df\c0" ;; "\df\c0" @@ -208,7 +208,7 @@ ;; byte after (last) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\df\fd" ;; "\df\fd" @@ -220,7 +220,7 @@ ;; 3-byte sequence contains 4 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\e1\80\80\80" ;; "\e1\80\80\80" @@ -230,7 +230,7 @@ ;; 3-byte sequence contains 2 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\e1\80" ;; "\e1\80" @@ -240,7 +240,7 @@ ;; 3-byte sequence contains 2 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e1\80\2e" ;; "\e1\80." @@ -250,7 +250,7 @@ ;; 3-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\02" ;; custom section "\01\e1" ;; "\e1" @@ -260,7 +260,7 @@ ;; 3-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\e1\2e" ;; "\e1." @@ -272,7 +272,7 @@ ;; first byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e0\00\a0" ;; "\e0\00\a0" @@ -282,7 +282,7 @@ ;; first byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e0\7f\a0" ;; "\e0\7f\a0" @@ -292,7 +292,7 @@ ;; overlong encoding after 0xe0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e0\80\80" ;; "\e0\80\80" @@ -302,7 +302,7 @@ ;; overlong encoding after 0xe0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e0\80\a0" ;; "\e0\80\a0" @@ -312,7 +312,7 @@ ;; overlong encoding after 0xe0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e0\9f\a0" ;; "\e0\9f\a0" @@ -322,7 +322,7 @@ ;; overlong encoding after 0xe0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e0\9f\bf" ;; "\e0\9f\bf" @@ -332,7 +332,7 @@ ;; first byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e0\c0\a0" ;; "\e0\c0\a0" @@ -342,7 +342,7 @@ ;; first byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e0\fd\a0" ;; "\e0\fd\a0" @@ -352,7 +352,7 @@ ;; first byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e1\00\80" ;; "\e1\00\80" @@ -362,7 +362,7 @@ ;; first byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e1\7f\80" ;; "\e1\7f\80" @@ -372,7 +372,7 @@ ;; first byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e1\c0\80" ;; "\e1\c0\80" @@ -382,7 +382,7 @@ ;; first byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e1\fd\80" ;; "\e1\fd\80" @@ -392,7 +392,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ec\00\80" ;; "\ec\00\80" @@ -402,7 +402,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ec\7f\80" ;; "\ec\7f\80" @@ -412,7 +412,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ec\c0\80" ;; "\ec\c0\80" @@ -422,7 +422,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ec\fd\80" ;; "\ec\fd\80" @@ -432,7 +432,7 @@ ;; first byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ed\00\80" ;; "\ed\00\80" @@ -442,7 +442,7 @@ ;; first byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ed\7f\80" ;; "\ed\7f\80" @@ -452,7 +452,7 @@ ;; byte sequence reserved for UTF-16 surrogate half (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ed\a0\80" ;; "\ed\a0\80" @@ -462,7 +462,7 @@ ;; byte sequence reserved for UTF-16 surrogate half (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ed\a0\bf" ;; "\ed\a0\bf" @@ -472,7 +472,7 @@ ;; byte sequence reserved for UTF-16 surrogate half (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ed\bf\80" ;; "\ed\bf\80" @@ -482,7 +482,7 @@ ;; byte sequence reserved for UTF-16 surrogate half (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ed\bf\bf" ;; "\ed\bf\bf" @@ -492,7 +492,7 @@ ;; first byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ed\c0\80" ;; "\ed\c0\80" @@ -502,7 +502,7 @@ ;; first byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ed\fd\80" ;; "\ed\fd\80" @@ -512,7 +512,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ee\00\80" ;; "\ee\00\80" @@ -522,7 +522,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ee\7f\80" ;; "\ee\7f\80" @@ -532,7 +532,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ee\c0\80" ;; "\ee\c0\80" @@ -542,7 +542,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ee\fd\80" ;; "\ee\fd\80" @@ -552,7 +552,7 @@ ;; first byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ef\00\80" ;; "\ef\00\80" @@ -562,7 +562,7 @@ ;; first byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ef\7f\80" ;; "\ef\7f\80" @@ -572,7 +572,7 @@ ;; first byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ef\c0\80" ;; "\ef\c0\80" @@ -582,7 +582,7 @@ ;; first byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ef\fd\80" ;; "\ef\fd\80" @@ -594,7 +594,7 @@ ;; second byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e0\a0\00" ;; "\e0\a0\00" @@ -604,7 +604,7 @@ ;; second byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e0\a0\7f" ;; "\e0\a0\7f" @@ -614,7 +614,7 @@ ;; second byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e0\a0\c0" ;; "\e0\a0\c0" @@ -624,7 +624,7 @@ ;; second byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e0\a0\fd" ;; "\e0\a0\fd" @@ -634,7 +634,7 @@ ;; second byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e1\80\00" ;; "\e1\80\00" @@ -644,7 +644,7 @@ ;; second byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e1\80\7f" ;; "\e1\80\7f" @@ -654,7 +654,7 @@ ;; second byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e1\80\c0" ;; "\e1\80\c0" @@ -664,7 +664,7 @@ ;; second byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\e1\80\fd" ;; "\e1\80\fd" @@ -674,7 +674,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ec\80\00" ;; "\ec\80\00" @@ -684,7 +684,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ec\80\7f" ;; "\ec\80\7f" @@ -694,7 +694,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ec\80\c0" ;; "\ec\80\c0" @@ -704,7 +704,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ec\80\fd" ;; "\ec\80\fd" @@ -714,7 +714,7 @@ ;; second byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ed\80\00" ;; "\ed\80\00" @@ -724,7 +724,7 @@ ;; second byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ed\80\7f" ;; "\ed\80\7f" @@ -734,7 +734,7 @@ ;; second byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ed\80\c0" ;; "\ed\80\c0" @@ -744,7 +744,7 @@ ;; second byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ed\80\fd" ;; "\ed\80\fd" @@ -754,7 +754,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ee\80\00" ;; "\ee\80\00" @@ -764,7 +764,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ee\80\7f" ;; "\ee\80\7f" @@ -774,7 +774,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ee\80\c0" ;; "\ee\80\c0" @@ -784,7 +784,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ee\80\fd" ;; "\ee\80\fd" @@ -794,7 +794,7 @@ ;; second byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ef\80\00" ;; "\ef\80\00" @@ -804,7 +804,7 @@ ;; second byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ef\80\7f" ;; "\ef\80\7f" @@ -814,7 +814,7 @@ ;; second byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ef\80\c0" ;; "\ef\80\c0" @@ -824,7 +824,7 @@ ;; second byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\ef\80\fd" ;; "\ef\80\fd" @@ -836,7 +836,7 @@ ;; 4-byte sequence contains 5 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\06" ;; custom section "\05\f1\80\80\80\80" ;; "\f1\80\80\80\80" @@ -846,7 +846,7 @@ ;; 4-byte sequence contains 3 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\f1\80\80" ;; "\f1\80\80" @@ -856,7 +856,7 @@ ;; 4-byte sequence contains 3 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f1\80\80\23" ;; "\f1\80\80#" @@ -866,7 +866,7 @@ ;; 4-byte sequence contains 2 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\f1\80" ;; "\f1\80" @@ -876,7 +876,7 @@ ;; 4-byte sequence contains 2 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\f1\80\23" ;; "\f1\80#" @@ -886,7 +886,7 @@ ;; 4-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\02" ;; custom section "\01\f1" ;; "\f1" @@ -896,7 +896,7 @@ ;; 4-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\f1\23" ;; "\f1#" @@ -908,7 +908,7 @@ ;; first byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\00\90\90" ;; "\f0\00\90\90" @@ -918,7 +918,7 @@ ;; first byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\7f\90\90" ;; "\f0\7f\90\90" @@ -928,7 +928,7 @@ ;; overlong encoding after 0xf0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\80\80\80" ;; "\f0\80\80\80" @@ -938,7 +938,7 @@ ;; overlong encoding after 0xf0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\80\90\90" ;; "\f0\80\90\90" @@ -948,7 +948,7 @@ ;; overlong encoding after 0xf0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\8f\90\90" ;; "\f0\8f\90\90" @@ -958,7 +958,7 @@ ;; overlong encoding after 0xf0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\8f\bf\bf" ;; "\f0\8f\bf\bf" @@ -968,7 +968,7 @@ ;; first byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\c0\90\90" ;; "\f0\c0\90\90" @@ -978,7 +978,7 @@ ;; first byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\fd\90\90" ;; "\f0\fd\90\90" @@ -988,7 +988,7 @@ ;; first byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f1\00\80\80" ;; "\f1\00\80\80" @@ -998,7 +998,7 @@ ;; first byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f1\7f\80\80" ;; "\f1\7f\80\80" @@ -1008,7 +1008,7 @@ ;; first byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f1\c0\80\80" ;; "\f1\c0\80\80" @@ -1018,7 +1018,7 @@ ;; first byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f1\fd\80\80" ;; "\f1\fd\80\80" @@ -1028,7 +1028,7 @@ ;; first byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f3\00\80\80" ;; "\f3\00\80\80" @@ -1038,7 +1038,7 @@ ;; first byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f3\7f\80\80" ;; "\f3\7f\80\80" @@ -1048,7 +1048,7 @@ ;; first byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f3\c0\80\80" ;; "\f3\c0\80\80" @@ -1058,7 +1058,7 @@ ;; first byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f3\fd\80\80" ;; "\f3\fd\80\80" @@ -1068,7 +1068,7 @@ ;; first byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f4\00\80\80" ;; "\f4\00\80\80" @@ -1078,7 +1078,7 @@ ;; first byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f4\7f\80\80" ;; "\f4\7f\80\80" @@ -1088,7 +1088,7 @@ ;; (first) invalid code point (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f4\90\80\80" ;; "\f4\90\80\80" @@ -1098,7 +1098,7 @@ ;; invalid code point (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f4\bf\80\80" ;; "\f4\bf\80\80" @@ -1108,7 +1108,7 @@ ;; first byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f4\c0\80\80" ;; "\f4\c0\80\80" @@ -1118,7 +1118,7 @@ ;; first byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f4\fd\80\80" ;; "\f4\fd\80\80" @@ -1128,7 +1128,7 @@ ;; (first) invalid 4-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f5\80\80\80" ;; "\f5\80\80\80" @@ -1138,7 +1138,7 @@ ;; (last) invalid 4-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f7\80\80\80" ;; "\f7\80\80\80" @@ -1148,7 +1148,7 @@ ;; (last) invalid 4-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f7\bf\bf\bf" ;; "\f7\bf\bf\bf" @@ -1160,7 +1160,7 @@ ;; second byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\90\00\90" ;; "\f0\90\00\90" @@ -1170,7 +1170,7 @@ ;; second byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\90\7f\90" ;; "\f0\90\7f\90" @@ -1180,7 +1180,7 @@ ;; second byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\90\c0\90" ;; "\f0\90\c0\90" @@ -1190,7 +1190,7 @@ ;; second byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\90\fd\90" ;; "\f0\90\fd\90" @@ -1200,7 +1200,7 @@ ;; second byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f1\80\00\80" ;; "\f1\80\00\80" @@ -1210,7 +1210,7 @@ ;; second byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f1\80\7f\80" ;; "\f1\80\7f\80" @@ -1220,7 +1220,7 @@ ;; second byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f1\80\c0\80" ;; "\f1\80\c0\80" @@ -1230,7 +1230,7 @@ ;; second byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f1\80\fd\80" ;; "\f1\80\fd\80" @@ -1240,7 +1240,7 @@ ;; second byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f3\80\00\80" ;; "\f3\80\00\80" @@ -1250,7 +1250,7 @@ ;; second byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f3\80\7f\80" ;; "\f3\80\7f\80" @@ -1260,7 +1260,7 @@ ;; second byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f3\80\c0\80" ;; "\f3\80\c0\80" @@ -1270,7 +1270,7 @@ ;; second byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f3\80\fd\80" ;; "\f3\80\fd\80" @@ -1280,7 +1280,7 @@ ;; second byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f4\80\00\80" ;; "\f4\80\00\80" @@ -1290,7 +1290,7 @@ ;; second byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f4\80\7f\80" ;; "\f4\80\7f\80" @@ -1300,7 +1300,7 @@ ;; second byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f4\80\c0\80" ;; "\f4\80\c0\80" @@ -1310,7 +1310,7 @@ ;; second byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f4\80\fd\80" ;; "\f4\80\fd\80" @@ -1322,7 +1322,7 @@ ;; third byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\90\90\00" ;; "\f0\90\90\00" @@ -1332,7 +1332,7 @@ ;; third byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\90\90\7f" ;; "\f0\90\90\7f" @@ -1342,7 +1342,7 @@ ;; third byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\90\90\c0" ;; "\f0\90\90\c0" @@ -1352,7 +1352,7 @@ ;; third byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f0\90\90\fd" ;; "\f0\90\90\fd" @@ -1362,7 +1362,7 @@ ;; third byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f1\80\80\00" ;; "\f1\80\80\00" @@ -1372,7 +1372,7 @@ ;; third byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f1\80\80\7f" ;; "\f1\80\80\7f" @@ -1382,7 +1382,7 @@ ;; third byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f1\80\80\c0" ;; "\f1\80\80\c0" @@ -1392,7 +1392,7 @@ ;; third byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f1\80\80\fd" ;; "\f1\80\80\fd" @@ -1402,7 +1402,7 @@ ;; third byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f3\80\80\00" ;; "\f3\80\80\00" @@ -1412,7 +1412,7 @@ ;; third byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f3\80\80\7f" ;; "\f3\80\80\7f" @@ -1422,7 +1422,7 @@ ;; third byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f3\80\80\c0" ;; "\f3\80\80\c0" @@ -1432,7 +1432,7 @@ ;; third byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f3\80\80\fd" ;; "\f3\80\80\fd" @@ -1442,7 +1442,7 @@ ;; third byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f4\80\80\00" ;; "\f4\80\80\00" @@ -1452,7 +1452,7 @@ ;; third byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f4\80\80\7f" ;; "\f4\80\80\7f" @@ -1462,7 +1462,7 @@ ;; third byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f4\80\80\c0" ;; "\f4\80\80\c0" @@ -1472,7 +1472,7 @@ ;; third byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f4\80\80\fd" ;; "\f4\80\80\fd" @@ -1484,7 +1484,7 @@ ;; 5-byte sequence contains 6 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\07" ;; custom section "\06\f8\80\80\80\80\80" ;; "\f8\80\80\80\80\80" @@ -1494,7 +1494,7 @@ ;; 5-byte sequence contains 4 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f8\80\80\80" ;; "\f8\80\80\80" @@ -1504,7 +1504,7 @@ ;; 5-byte sequence contains 4 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\06" ;; custom section "\05\f8\80\80\80\23" ;; "\f8\80\80\80#" @@ -1514,7 +1514,7 @@ ;; 5-byte sequence contains 3 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\f8\80\80" ;; "\f8\80\80" @@ -1524,7 +1524,7 @@ ;; 5-byte sequence contains 3 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\f8\80\80\23" ;; "\f8\80\80#" @@ -1534,7 +1534,7 @@ ;; 5-byte sequence contains 2 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\f8\80" ;; "\f8\80" @@ -1544,7 +1544,7 @@ ;; 5-byte sequence contains 2 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\f8\80\23" ;; "\f8\80#" @@ -1554,7 +1554,7 @@ ;; 5-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\02" ;; custom section "\01\f8" ;; "\f8" @@ -1564,7 +1564,7 @@ ;; 5-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\f8\23" ;; "\f8#" @@ -1576,7 +1576,7 @@ ;; (first) invalid 5-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\06" ;; custom section "\05\f8\80\80\80\80" ;; "\f8\80\80\80\80" @@ -1586,7 +1586,7 @@ ;; (last) invalid 5-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\06" ;; custom section "\05\fb\bf\bf\bf\bf" ;; "\fb\bf\bf\bf\bf" @@ -1598,7 +1598,7 @@ ;; 6-byte sequence contains 7 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\08" ;; custom section "\07\fc\80\80\80\80\80\80" ;; "\fc\80\80\80\80\80\80" @@ -1608,7 +1608,7 @@ ;; 6-byte sequence contains 5 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\06" ;; custom section "\05\fc\80\80\80\80" ;; "\fc\80\80\80\80" @@ -1618,7 +1618,7 @@ ;; 6-byte sequence contains 5 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\07" ;; custom section "\06\fc\80\80\80\80\23" ;; "\fc\80\80\80\80#" @@ -1628,7 +1628,7 @@ ;; 6-byte sequence contains 4 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\fc\80\80\80" ;; "\fc\80\80\80" @@ -1638,7 +1638,7 @@ ;; 6-byte sequence contains 4 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\06" ;; custom section "\05\fc\80\80\80\23" ;; "\fc\80\80\80#" @@ -1648,7 +1648,7 @@ ;; 6-byte sequence contains 3 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\fc\80\80" ;; "\fc\80\80" @@ -1658,7 +1658,7 @@ ;; 6-byte sequence contains 3 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\fc\80\80\23" ;; "\fc\80\80#" @@ -1668,7 +1668,7 @@ ;; 6-byte sequence contains 2 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\fc\80" ;; "\fc\80" @@ -1678,7 +1678,7 @@ ;; 6-byte sequence contains 2 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\04" ;; custom section "\03\fc\80\23" ;; "\fc\80#" @@ -1688,7 +1688,7 @@ ;; 6-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\02" ;; custom section "\01\fc" ;; "\fc" @@ -1698,7 +1698,7 @@ ;; 6-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\fc\23" ;; "\fc#" @@ -1710,7 +1710,7 @@ ;; (first) invalid 6-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\07" ;; custom section "\06\fc\80\80\80\80\80" ;; "\fc\80\80\80\80\80" @@ -1720,7 +1720,7 @@ ;; (last) invalid 6-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\07" ;; custom section "\06\fd\bf\bf\bf\bf\bf" ;; "\fd\bf\bf\bf\bf\bf" @@ -1732,7 +1732,7 @@ ;; invalid byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\02" ;; custom section "\01\fe" ;; "\fe" @@ -1742,7 +1742,7 @@ ;; invalid byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\02" ;; custom section "\01\ff" ;; "\ff" @@ -1752,7 +1752,7 @@ ;; UTF-16BE BOM (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\fe\ff" ;; "\fe\ff" @@ -1762,7 +1762,7 @@ ;; UTF-32BE BOM (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\00\00\fe\ff" ;; "\00\00\fe\ff" @@ -1772,7 +1772,7 @@ ;; UTF-16LE BOM (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\03" ;; custom section "\02\ff\fe" ;; "\ff\fe" @@ -1782,7 +1782,7 @@ ;; UTF-32LE BOM (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\00\05" ;; custom section "\04\ff\fe\00\00" ;; "\ff\fe\00\00" diff --git a/test/core/utf8-import-field.wast b/test/core/utf8-import-field.wast index 256eb8a487..1ff2aa0306 100644 --- a/test/core/utf8-import-field.wast +++ b/test/core/utf8-import-field.wast @@ -4,7 +4,7 @@ ;; encoding starts with (first) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -19,7 +19,7 @@ ;; encoding starts with (0x8f) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -34,7 +34,7 @@ ;; encoding starts with (0x90) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -49,7 +49,7 @@ ;; encoding starts with (0x9f) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -64,7 +64,7 @@ ;; encoding starts with (0xa0) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -79,7 +79,7 @@ ;; encoding starts with (last) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -96,7 +96,7 @@ ;; 2-byte sequence contains 3 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -111,7 +111,7 @@ ;; 2-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -126,7 +126,7 @@ ;; 2-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -143,7 +143,7 @@ ;; overlong encoding after 0xc0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -158,7 +158,7 @@ ;; overlong encoding after 0xc0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -173,7 +173,7 @@ ;; overlong encoding after 0xc1 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -188,7 +188,7 @@ ;; overlong encoding after 0xc1 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -203,7 +203,7 @@ ;; byte after (first) 2-byte prefix not a contination byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -218,7 +218,7 @@ ;; byte after (first) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -233,7 +233,7 @@ ;; byte after (first) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -248,7 +248,7 @@ ;; byte after (first) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -263,7 +263,7 @@ ;; byte after (last) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -278,7 +278,7 @@ ;; byte after (last) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -293,7 +293,7 @@ ;; byte after (last) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -308,7 +308,7 @@ ;; byte after (last) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -325,7 +325,7 @@ ;; 3-byte sequence contains 4 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -340,7 +340,7 @@ ;; 3-byte sequence contains 2 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -355,7 +355,7 @@ ;; 3-byte sequence contains 2 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -370,7 +370,7 @@ ;; 3-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -385,7 +385,7 @@ ;; 3-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -402,7 +402,7 @@ ;; first byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -417,7 +417,7 @@ ;; first byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -432,7 +432,7 @@ ;; overlong encoding after 0xe0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -447,7 +447,7 @@ ;; overlong encoding after 0xe0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -462,7 +462,7 @@ ;; overlong encoding after 0xe0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -477,7 +477,7 @@ ;; overlong encoding after 0xe0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -492,7 +492,7 @@ ;; first byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -507,7 +507,7 @@ ;; first byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -522,7 +522,7 @@ ;; first byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -537,7 +537,7 @@ ;; first byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -552,7 +552,7 @@ ;; first byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -567,7 +567,7 @@ ;; first byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -582,7 +582,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -597,7 +597,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -612,7 +612,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -627,7 +627,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -642,7 +642,7 @@ ;; first byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -657,7 +657,7 @@ ;; first byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -672,7 +672,7 @@ ;; byte sequence reserved for UTF-16 surrogate half (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -687,7 +687,7 @@ ;; byte sequence reserved for UTF-16 surrogate half (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -702,7 +702,7 @@ ;; byte sequence reserved for UTF-16 surrogate half (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -717,7 +717,7 @@ ;; byte sequence reserved for UTF-16 surrogate half (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -732,7 +732,7 @@ ;; first byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -747,7 +747,7 @@ ;; first byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -762,7 +762,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -777,7 +777,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -792,7 +792,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -807,7 +807,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -822,7 +822,7 @@ ;; first byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -837,7 +837,7 @@ ;; first byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -852,7 +852,7 @@ ;; first byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -867,7 +867,7 @@ ;; first byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -884,7 +884,7 @@ ;; second byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -899,7 +899,7 @@ ;; second byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -914,7 +914,7 @@ ;; second byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -929,7 +929,7 @@ ;; second byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -944,7 +944,7 @@ ;; second byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -959,7 +959,7 @@ ;; second byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -974,7 +974,7 @@ ;; second byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -989,7 +989,7 @@ ;; second byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1004,7 +1004,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1019,7 +1019,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1034,7 +1034,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1049,7 +1049,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1064,7 +1064,7 @@ ;; second byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1079,7 +1079,7 @@ ;; second byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1094,7 +1094,7 @@ ;; second byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1109,7 +1109,7 @@ ;; second byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1124,7 +1124,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1139,7 +1139,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1154,7 +1154,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1169,7 +1169,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1184,7 +1184,7 @@ ;; second byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1199,7 +1199,7 @@ ;; second byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1214,7 +1214,7 @@ ;; second byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1229,7 +1229,7 @@ ;; second byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1246,7 +1246,7 @@ ;; 4-byte sequence contains 5 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0f" ;; import section "\01" ;; length 1 @@ -1261,7 +1261,7 @@ ;; 4-byte sequence contains 3 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1276,7 +1276,7 @@ ;; 4-byte sequence contains 3 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1291,7 +1291,7 @@ ;; 4-byte sequence contains 2 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -1306,7 +1306,7 @@ ;; 4-byte sequence contains 2 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1321,7 +1321,7 @@ ;; 4-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -1336,7 +1336,7 @@ ;; 4-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -1353,7 +1353,7 @@ ;; first byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1368,7 +1368,7 @@ ;; first byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1383,7 +1383,7 @@ ;; overlong encoding after 0xf0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1398,7 +1398,7 @@ ;; overlong encoding after 0xf0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1413,7 +1413,7 @@ ;; overlong encoding after 0xf0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1428,7 +1428,7 @@ ;; overlong encoding after 0xf0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1443,7 +1443,7 @@ ;; first byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1458,7 +1458,7 @@ ;; first byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1473,7 +1473,7 @@ ;; first byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1488,7 +1488,7 @@ ;; first byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1503,7 +1503,7 @@ ;; first byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1518,7 +1518,7 @@ ;; first byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1533,7 +1533,7 @@ ;; first byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1548,7 +1548,7 @@ ;; first byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1563,7 +1563,7 @@ ;; first byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1578,7 +1578,7 @@ ;; first byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1593,7 +1593,7 @@ ;; first byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1608,7 +1608,7 @@ ;; first byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1623,7 +1623,7 @@ ;; (first) invalid code point (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1638,7 +1638,7 @@ ;; invalid code point (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1653,7 +1653,7 @@ ;; first byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1668,7 +1668,7 @@ ;; first byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1683,7 +1683,7 @@ ;; (first) invalid 4-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1698,7 +1698,7 @@ ;; (last) invalid 4-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1713,7 +1713,7 @@ ;; (last) invalid 4-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1730,7 +1730,7 @@ ;; second byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1745,7 +1745,7 @@ ;; second byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1760,7 +1760,7 @@ ;; second byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1775,7 +1775,7 @@ ;; second byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1790,7 +1790,7 @@ ;; second byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1805,7 +1805,7 @@ ;; second byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1820,7 +1820,7 @@ ;; second byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1835,7 +1835,7 @@ ;; second byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1850,7 +1850,7 @@ ;; second byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1865,7 +1865,7 @@ ;; second byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1880,7 +1880,7 @@ ;; second byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1895,7 +1895,7 @@ ;; second byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1910,7 +1910,7 @@ ;; second byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1925,7 +1925,7 @@ ;; second byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1940,7 +1940,7 @@ ;; second byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1955,7 +1955,7 @@ ;; second byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1972,7 +1972,7 @@ ;; third byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1987,7 +1987,7 @@ ;; third byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2002,7 +2002,7 @@ ;; third byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2017,7 +2017,7 @@ ;; third byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2032,7 +2032,7 @@ ;; third byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2047,7 +2047,7 @@ ;; third byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2062,7 +2062,7 @@ ;; third byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2077,7 +2077,7 @@ ;; third byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2092,7 +2092,7 @@ ;; third byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2107,7 +2107,7 @@ ;; third byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2122,7 +2122,7 @@ ;; third byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2137,7 +2137,7 @@ ;; third byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2152,7 +2152,7 @@ ;; third byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2167,7 +2167,7 @@ ;; third byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2182,7 +2182,7 @@ ;; third byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2197,7 +2197,7 @@ ;; third byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2214,7 +2214,7 @@ ;; 5-byte sequence contains 6 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\10" ;; import section "\01" ;; length 1 @@ -2229,7 +2229,7 @@ ;; 5-byte sequence contains 4 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2244,7 +2244,7 @@ ;; 5-byte sequence contains 4 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0f" ;; import section "\01" ;; length 1 @@ -2259,7 +2259,7 @@ ;; 5-byte sequence contains 3 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -2274,7 +2274,7 @@ ;; 5-byte sequence contains 3 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2289,7 +2289,7 @@ ;; 5-byte sequence contains 2 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -2304,7 +2304,7 @@ ;; 5-byte sequence contains 2 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -2319,7 +2319,7 @@ ;; 5-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -2334,7 +2334,7 @@ ;; 5-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -2351,7 +2351,7 @@ ;; (first) invalid 5-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0f" ;; import section "\01" ;; length 1 @@ -2366,7 +2366,7 @@ ;; (last) invalid 5-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0f" ;; import section "\01" ;; length 1 @@ -2383,7 +2383,7 @@ ;; 6-byte sequence contains 7 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\11" ;; import section "\01" ;; length 1 @@ -2398,7 +2398,7 @@ ;; 6-byte sequence contains 5 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0f" ;; import section "\01" ;; length 1 @@ -2413,7 +2413,7 @@ ;; 6-byte sequence contains 5 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\10" ;; import section "\01" ;; length 1 @@ -2428,7 +2428,7 @@ ;; 6-byte sequence contains 4 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2443,7 +2443,7 @@ ;; 6-byte sequence contains 4 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0f" ;; import section "\01" ;; length 1 @@ -2458,7 +2458,7 @@ ;; 6-byte sequence contains 3 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -2473,7 +2473,7 @@ ;; 6-byte sequence contains 3 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2488,7 +2488,7 @@ ;; 6-byte sequence contains 2 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -2503,7 +2503,7 @@ ;; 6-byte sequence contains 2 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -2518,7 +2518,7 @@ ;; 6-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -2533,7 +2533,7 @@ ;; 6-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -2550,7 +2550,7 @@ ;; (first) invalid 6-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\10" ;; import section "\01" ;; length 1 @@ -2565,7 +2565,7 @@ ;; (last) invalid 6-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\10" ;; import section "\01" ;; length 1 @@ -2582,7 +2582,7 @@ ;; invalid byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -2597,7 +2597,7 @@ ;; invalid byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -2612,7 +2612,7 @@ ;; UTF-16BE BOM (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -2627,7 +2627,7 @@ ;; UTF-32BE BOM (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2642,7 +2642,7 @@ ;; UTF-16LE BOM (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -2657,7 +2657,7 @@ ;; UTF-32LE BOM (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 diff --git a/test/core/utf8-import-module.wast b/test/core/utf8-import-module.wast index 900f6bfb82..ceabbeb7ce 100644 --- a/test/core/utf8-import-module.wast +++ b/test/core/utf8-import-module.wast @@ -4,7 +4,7 @@ ;; encoding starts with (first) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -19,7 +19,7 @@ ;; encoding starts with (0x8f) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -34,7 +34,7 @@ ;; encoding starts with (0x90) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -49,7 +49,7 @@ ;; encoding starts with (0x9f) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -64,7 +64,7 @@ ;; encoding starts with (0xa0) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -79,7 +79,7 @@ ;; encoding starts with (last) continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -96,7 +96,7 @@ ;; 2-byte sequence contains 3 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -111,7 +111,7 @@ ;; 2-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -126,7 +126,7 @@ ;; 2-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -143,7 +143,7 @@ ;; overlong encoding after 0xc0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -158,7 +158,7 @@ ;; overlong encoding after 0xc0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -173,7 +173,7 @@ ;; overlong encoding after 0xc1 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -188,7 +188,7 @@ ;; overlong encoding after 0xc1 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -203,7 +203,7 @@ ;; byte after (first) 2-byte prefix not a contination byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -218,7 +218,7 @@ ;; byte after (first) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -233,7 +233,7 @@ ;; byte after (first) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -248,7 +248,7 @@ ;; byte after (first) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -263,7 +263,7 @@ ;; byte after (last) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -278,7 +278,7 @@ ;; byte after (last) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -293,7 +293,7 @@ ;; byte after (last) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -308,7 +308,7 @@ ;; byte after (last) 2-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -325,7 +325,7 @@ ;; 3-byte sequence contains 4 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -340,7 +340,7 @@ ;; 3-byte sequence contains 2 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -355,7 +355,7 @@ ;; 3-byte sequence contains 2 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -370,7 +370,7 @@ ;; 3-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -385,7 +385,7 @@ ;; 3-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -402,7 +402,7 @@ ;; first byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -417,7 +417,7 @@ ;; first byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -432,7 +432,7 @@ ;; overlong encoding after 0xe0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -447,7 +447,7 @@ ;; overlong encoding after 0xe0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -462,7 +462,7 @@ ;; overlong encoding after 0xe0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -477,7 +477,7 @@ ;; overlong encoding after 0xe0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -492,7 +492,7 @@ ;; first byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -507,7 +507,7 @@ ;; first byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -522,7 +522,7 @@ ;; first byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -537,7 +537,7 @@ ;; first byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -552,7 +552,7 @@ ;; first byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -567,7 +567,7 @@ ;; first byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -582,7 +582,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -597,7 +597,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -612,7 +612,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -627,7 +627,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -642,7 +642,7 @@ ;; first byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -657,7 +657,7 @@ ;; first byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -672,7 +672,7 @@ ;; byte sequence reserved for UTF-16 surrogate half (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -687,7 +687,7 @@ ;; byte sequence reserved for UTF-16 surrogate half (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -702,7 +702,7 @@ ;; byte sequence reserved for UTF-16 surrogate half (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -717,7 +717,7 @@ ;; byte sequence reserved for UTF-16 surrogate half (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -732,7 +732,7 @@ ;; first byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -747,7 +747,7 @@ ;; first byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -762,7 +762,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -777,7 +777,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -792,7 +792,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -807,7 +807,7 @@ ;; first byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -822,7 +822,7 @@ ;; first byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -837,7 +837,7 @@ ;; first byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -852,7 +852,7 @@ ;; first byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -867,7 +867,7 @@ ;; first byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -884,7 +884,7 @@ ;; second byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -899,7 +899,7 @@ ;; second byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -914,7 +914,7 @@ ;; second byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -929,7 +929,7 @@ ;; second byte after (0xe0) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -944,7 +944,7 @@ ;; second byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -959,7 +959,7 @@ ;; second byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -974,7 +974,7 @@ ;; second byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -989,7 +989,7 @@ ;; second byte after (first normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1004,7 +1004,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1019,7 +1019,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1034,7 +1034,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1049,7 +1049,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1064,7 +1064,7 @@ ;; second byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1079,7 +1079,7 @@ ;; second byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1094,7 +1094,7 @@ ;; second byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1109,7 +1109,7 @@ ;; second byte after (0xed) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1124,7 +1124,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1139,7 +1139,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1154,7 +1154,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1169,7 +1169,7 @@ ;; second byte after (normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1184,7 +1184,7 @@ ;; second byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1199,7 +1199,7 @@ ;; second byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1214,7 +1214,7 @@ ;; second byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1229,7 +1229,7 @@ ;; second byte after (last normal) 3-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1246,7 +1246,7 @@ ;; 4-byte sequence contains 5 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0f" ;; import section "\01" ;; length 1 @@ -1261,7 +1261,7 @@ ;; 4-byte sequence contains 3 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1276,7 +1276,7 @@ ;; 4-byte sequence contains 3 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1291,7 +1291,7 @@ ;; 4-byte sequence contains 2 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -1306,7 +1306,7 @@ ;; 4-byte sequence contains 2 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -1321,7 +1321,7 @@ ;; 4-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -1336,7 +1336,7 @@ ;; 4-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -1353,7 +1353,7 @@ ;; first byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1368,7 +1368,7 @@ ;; first byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1383,7 +1383,7 @@ ;; overlong encoding after 0xf0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1398,7 +1398,7 @@ ;; overlong encoding after 0xf0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1413,7 +1413,7 @@ ;; overlong encoding after 0xf0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1428,7 +1428,7 @@ ;; overlong encoding after 0xf0 prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1443,7 +1443,7 @@ ;; first byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1458,7 +1458,7 @@ ;; first byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1473,7 +1473,7 @@ ;; first byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1488,7 +1488,7 @@ ;; first byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1503,7 +1503,7 @@ ;; first byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1518,7 +1518,7 @@ ;; first byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1533,7 +1533,7 @@ ;; first byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1548,7 +1548,7 @@ ;; first byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1563,7 +1563,7 @@ ;; first byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1578,7 +1578,7 @@ ;; first byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1593,7 +1593,7 @@ ;; first byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1608,7 +1608,7 @@ ;; first byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1623,7 +1623,7 @@ ;; (first) invalid code point (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1638,7 +1638,7 @@ ;; invalid code point (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1653,7 +1653,7 @@ ;; first byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1668,7 +1668,7 @@ ;; first byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1683,7 +1683,7 @@ ;; (first) invalid 4-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1698,7 +1698,7 @@ ;; (last) invalid 4-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1713,7 +1713,7 @@ ;; (last) invalid 4-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1730,7 +1730,7 @@ ;; second byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1745,7 +1745,7 @@ ;; second byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1760,7 +1760,7 @@ ;; second byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1775,7 +1775,7 @@ ;; second byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1790,7 +1790,7 @@ ;; second byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1805,7 +1805,7 @@ ;; second byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1820,7 +1820,7 @@ ;; second byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1835,7 +1835,7 @@ ;; second byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1850,7 +1850,7 @@ ;; second byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1865,7 +1865,7 @@ ;; second byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1880,7 +1880,7 @@ ;; second byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1895,7 +1895,7 @@ ;; second byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1910,7 +1910,7 @@ ;; second byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1925,7 +1925,7 @@ ;; second byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1940,7 +1940,7 @@ ;; second byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1955,7 +1955,7 @@ ;; second byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1972,7 +1972,7 @@ ;; third byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -1987,7 +1987,7 @@ ;; third byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2002,7 +2002,7 @@ ;; third byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2017,7 +2017,7 @@ ;; third byte after (0xf0) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2032,7 +2032,7 @@ ;; third byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2047,7 +2047,7 @@ ;; third byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2062,7 +2062,7 @@ ;; third byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2077,7 +2077,7 @@ ;; third byte after (first normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2092,7 +2092,7 @@ ;; third byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2107,7 +2107,7 @@ ;; third byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2122,7 +2122,7 @@ ;; third byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2137,7 +2137,7 @@ ;; third byte after (last normal) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2152,7 +2152,7 @@ ;; third byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2167,7 +2167,7 @@ ;; third byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2182,7 +2182,7 @@ ;; third byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2197,7 +2197,7 @@ ;; third byte after (0xf4) 4-byte prefix not a continuation byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2214,7 +2214,7 @@ ;; 5-byte sequence contains 6 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\10" ;; import section "\01" ;; length 1 @@ -2229,7 +2229,7 @@ ;; 5-byte sequence contains 4 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2244,7 +2244,7 @@ ;; 5-byte sequence contains 4 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0f" ;; import section "\01" ;; length 1 @@ -2259,7 +2259,7 @@ ;; 5-byte sequence contains 3 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -2274,7 +2274,7 @@ ;; 5-byte sequence contains 3 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2289,7 +2289,7 @@ ;; 5-byte sequence contains 2 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -2304,7 +2304,7 @@ ;; 5-byte sequence contains 2 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -2319,7 +2319,7 @@ ;; 5-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -2334,7 +2334,7 @@ ;; 5-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -2351,7 +2351,7 @@ ;; (first) invalid 5-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0f" ;; import section "\01" ;; length 1 @@ -2366,7 +2366,7 @@ ;; (last) invalid 5-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0f" ;; import section "\01" ;; length 1 @@ -2383,7 +2383,7 @@ ;; 6-byte sequence contains 7 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\11" ;; import section "\01" ;; length 1 @@ -2398,7 +2398,7 @@ ;; 6-byte sequence contains 5 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0f" ;; import section "\01" ;; length 1 @@ -2413,7 +2413,7 @@ ;; 6-byte sequence contains 5 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\10" ;; import section "\01" ;; length 1 @@ -2428,7 +2428,7 @@ ;; 6-byte sequence contains 4 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2443,7 +2443,7 @@ ;; 6-byte sequence contains 4 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0f" ;; import section "\01" ;; length 1 @@ -2458,7 +2458,7 @@ ;; 6-byte sequence contains 3 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -2473,7 +2473,7 @@ ;; 6-byte sequence contains 3 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2488,7 +2488,7 @@ ;; 6-byte sequence contains 2 bytes at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -2503,7 +2503,7 @@ ;; 6-byte sequence contains 2 bytes (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0d" ;; import section "\01" ;; length 1 @@ -2518,7 +2518,7 @@ ;; 6-byte sequence contains 1 byte at end of string (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -2533,7 +2533,7 @@ ;; 6-byte sequence contains 1 byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -2550,7 +2550,7 @@ ;; (first) invalid 6-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\10" ;; import section "\01" ;; length 1 @@ -2565,7 +2565,7 @@ ;; (last) invalid 6-byte prefix (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\10" ;; import section "\01" ;; length 1 @@ -2582,7 +2582,7 @@ ;; invalid byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -2597,7 +2597,7 @@ ;; invalid byte (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0b" ;; import section "\01" ;; length 1 @@ -2612,7 +2612,7 @@ ;; UTF-16BE BOM (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -2627,7 +2627,7 @@ ;; UTF-32BE BOM (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 @@ -2642,7 +2642,7 @@ ;; UTF-16LE BOM (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0c" ;; import section "\01" ;; length 1 @@ -2657,7 +2657,7 @@ ;; UTF-32LE BOM (assert_malformed - (module + (module binary "\00asm" "\01\00\00\00" "\02\0e" ;; import section "\01" ;; length 1 From 1db2131612dffa2095486a5c362aa1cbc63168a1 Mon Sep 17 00:00:00 2001 From: rossberg-chromium Date: Tue, 6 Jun 2017 13:40:30 +0200 Subject: [PATCH 2/3] Disallow extended module syntax in .wat files and quotes --- interpreter/Makefile | 4 ++-- interpreter/text/parser.mly | 33 ++++++++++++++++++++------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/interpreter/Makefile b/interpreter/Makefile index e92c9e5a38..a50117f4a4 100644 --- a/interpreter/Makefile +++ b/interpreter/Makefile @@ -10,8 +10,8 @@ # Configuration NAME = wasm -UNOPT = $(NAME) -OPT = $(NAME).opt +UNOPT = $(NAME).debug +OPT = $(NAME) LIB = $(NAME) ZIP = $(NAME).zip JSLIB = wast.js diff --git a/interpreter/text/parser.mly b/interpreter/text/parser.mly index c6ae16f916..b92a5e2ad8 100644 --- a/interpreter/text/parser.mly +++ b/interpreter/text/parser.mly @@ -656,13 +656,13 @@ module_fields1 : { fun c -> let m = $2 c in {m with exports = $1 c :: m.exports} } +module_var_opt : + | /* empty */ { None } + | VAR { Some ($1 @@ at ()) } /* Sugar */ + module_ : - | LPAR MODULE script_var_opt module_fields RPAR + | LPAR MODULE module_var_opt module_fields RPAR { $3, Textual ($4 (empty_context ()) @@ at ()) @@ at () } - | LPAR MODULE script_var_opt BIN string_list RPAR - { $3, Encoded ("binary", $5) @@ at() } - | LPAR MODULE script_var_opt QUOTE string_list RPAR - { $3, Quoted ("quote", $5) @@ at() } inline_module : /* Sugar */ | module_fields { Textual ($1 (empty_context ()) @@ at ()) @@ at () } @@ -677,20 +677,27 @@ script_var_opt : | /* empty */ { None } | VAR { Some ($1 @@ at ()) } /* Sugar */ +script_module : + | module_ { $1 } + | LPAR MODULE module_var_opt BIN string_list RPAR + { $3, Encoded ("binary", $5) @@ at() } + | LPAR MODULE module_var_opt QUOTE string_list RPAR + { $3, Quoted ("quote", $5) @@ at() } + action : - | LPAR INVOKE script_var_opt name const_list RPAR + | LPAR INVOKE module_var_opt name const_list RPAR { Invoke ($3, $4, $5) @@ at () } - | LPAR GET script_var_opt name RPAR + | LPAR GET module_var_opt name RPAR { Get ($3, $4) @@ at() } assertion : - | LPAR ASSERT_MALFORMED module_ STRING RPAR + | LPAR ASSERT_MALFORMED script_module STRING RPAR { AssertMalformed (snd $3, $4) @@ at () } - | LPAR ASSERT_INVALID module_ STRING RPAR + | LPAR ASSERT_INVALID script_module STRING RPAR { AssertInvalid (snd $3, $4) @@ at () } - | LPAR ASSERT_UNLINKABLE module_ STRING RPAR + | LPAR ASSERT_UNLINKABLE script_module STRING RPAR { AssertUnlinkable (snd $3, $4) @@ at () } - | LPAR ASSERT_TRAP module_ STRING RPAR + | LPAR ASSERT_TRAP script_module STRING RPAR { AssertUninstantiable (snd $3, $4) @@ at () } | LPAR ASSERT_RETURN action const_list RPAR { AssertReturn ($3, $4) @@ at () } | LPAR ASSERT_RETURN_CANONICAL_NAN action RPAR { AssertReturnCanonicalNaN $3 @@ at () } @@ -701,8 +708,8 @@ assertion : cmd : | action { Action $1 @@ at () } | assertion { Assertion $1 @@ at () } - | module_ { Module (fst $1, snd $1) @@ at () } - | LPAR REGISTER name script_var_opt RPAR { Register ($3, $4) @@ at () } + | script_module { Module (fst $1, snd $1) @@ at () } + | LPAR REGISTER name module_var_opt RPAR { Register ($3, $4) @@ at () } | meta { Meta $1 @@ at () } cmd_list : From adfea60d090a195db5eab1d64b77a3e6f0598ce7 Mon Sep 17 00:00:00 2001 From: rossberg-chromium Date: Tue, 6 Jun 2017 14:44:00 +0200 Subject: [PATCH 3/3] Convert .fail. tests into quoted modules --- test/core/address-offset-range.fail.wast | 4 - test/core/address.wast | 8 + test/core/block-end-label-mismatch.fail.wast | 1 - .../block-end-label-superfluous.fail.wast | 1 - test/core/block.wast | 10 ++ test/core/const.wast | 47 ++++++ test/core/f32.load32.fail.wast | 1 - test/core/f32.load64.fail.wast | 1 - test/core/f32.store32.fail.wast | 1 - test/core/f32.store64.fail.wast | 1 - test/core/f64.load32.fail.wast | 1 - test/core/f64.load64.fail.wast | 1 - test/core/f64.store32.fail.wast | 1 - test/core/f64.store64.fail.wast | 1 - test/core/func-local-after-body.fail.wast | 1 - test/core/func-local-before-param.fail.wast | 1 - test/core/func-local-before-result.fail.wast | 1 - test/core/func-param-after-body.fail.wast | 1 - test/core/func-result-after-body.fail.wast | 1 - test/core/func-result-before-param.fail.wast | 1 - test/core/func.wast | 27 ++++ test/core/i32.load32_s.fail.wast | 1 - test/core/i32.load32_u.fail.wast | 1 - test/core/i32.load64_s.fail.wast | 1 - test/core/i32.load64_u.fail.wast | 1 - test/core/i32.store32.fail.wast | 1 - test/core/i32.store64.fail.wast | 1 - test/core/i64.load64_s.fail.wast | 1 - test/core/i64.load64_u.fail.wast | 1 - test/core/i64.store64.fail.wast | 1 - .../core/if-else-end-label-mismatch.fail.wast | 1 - .../if-else-end-label-superfluous.fail.wast | 1 - test/core/if-else-label-mismatch.fail.wast | 1 - test/core/if-else-label-superfluous.fail.wast | 1 - test/core/if-end-label-mismatch.fail.wast | 1 - test/core/if-end-label-superfluous.fail.wast | 1 - test/core/if.wast | 42 +++++ test/core/import-after-func.fail.wast | 1 - test/core/import-after-global.fail.wast | 1 - test/core/import-after-memory.fail.wast | 1 - test/core/import-after-table.fail.wast | 1 - test/core/imports.wast | 71 +++++++++ test/core/loop-end-label-mismatch.fail.wast | 1 - .../core/loop-end-label-superfluous.fail.wast | 1 - test/core/loop.wast | 10 ++ test/core/memory.wast | 144 ++++++++++++++++++ .../core/of_string-overflow-hex-u32.fail.wast | 1 - .../core/of_string-overflow-hex-u64.fail.wast | 1 - test/core/of_string-overflow-s32.fail.wast | 1 - test/core/of_string-overflow-s64.fail.wast | 1 - test/core/of_string-overflow-u32.fail.wast | 1 - test/core/of_string-overflow-u64.fail.wast | 1 - test/core/token-keyword-separation.fail.wast | 1 - test/core/token-number-separation.fail.wast | 1 - test/core/token.wast | 10 ++ 55 files changed, 369 insertions(+), 49 deletions(-) delete mode 100644 test/core/address-offset-range.fail.wast delete mode 100644 test/core/block-end-label-mismatch.fail.wast delete mode 100644 test/core/block-end-label-superfluous.fail.wast create mode 100644 test/core/const.wast delete mode 100644 test/core/f32.load32.fail.wast delete mode 100644 test/core/f32.load64.fail.wast delete mode 100644 test/core/f32.store32.fail.wast delete mode 100644 test/core/f32.store64.fail.wast delete mode 100644 test/core/f64.load32.fail.wast delete mode 100644 test/core/f64.load64.fail.wast delete mode 100644 test/core/f64.store32.fail.wast delete mode 100644 test/core/f64.store64.fail.wast delete mode 100644 test/core/func-local-after-body.fail.wast delete mode 100644 test/core/func-local-before-param.fail.wast delete mode 100644 test/core/func-local-before-result.fail.wast delete mode 100644 test/core/func-param-after-body.fail.wast delete mode 100644 test/core/func-result-after-body.fail.wast delete mode 100644 test/core/func-result-before-param.fail.wast delete mode 100644 test/core/i32.load32_s.fail.wast delete mode 100644 test/core/i32.load32_u.fail.wast delete mode 100644 test/core/i32.load64_s.fail.wast delete mode 100644 test/core/i32.load64_u.fail.wast delete mode 100644 test/core/i32.store32.fail.wast delete mode 100644 test/core/i32.store64.fail.wast delete mode 100644 test/core/i64.load64_s.fail.wast delete mode 100644 test/core/i64.load64_u.fail.wast delete mode 100644 test/core/i64.store64.fail.wast delete mode 100644 test/core/if-else-end-label-mismatch.fail.wast delete mode 100644 test/core/if-else-end-label-superfluous.fail.wast delete mode 100644 test/core/if-else-label-mismatch.fail.wast delete mode 100644 test/core/if-else-label-superfluous.fail.wast delete mode 100644 test/core/if-end-label-mismatch.fail.wast delete mode 100644 test/core/if-end-label-superfluous.fail.wast delete mode 100644 test/core/import-after-func.fail.wast delete mode 100644 test/core/import-after-global.fail.wast delete mode 100644 test/core/import-after-memory.fail.wast delete mode 100644 test/core/import-after-table.fail.wast delete mode 100644 test/core/loop-end-label-mismatch.fail.wast delete mode 100644 test/core/loop-end-label-superfluous.fail.wast delete mode 100644 test/core/of_string-overflow-hex-u32.fail.wast delete mode 100644 test/core/of_string-overflow-hex-u64.fail.wast delete mode 100644 test/core/of_string-overflow-s32.fail.wast delete mode 100644 test/core/of_string-overflow-s64.fail.wast delete mode 100644 test/core/of_string-overflow-u32.fail.wast delete mode 100644 test/core/of_string-overflow-u64.fail.wast delete mode 100644 test/core/token-keyword-separation.fail.wast delete mode 100644 test/core/token-number-separation.fail.wast create mode 100644 test/core/token.wast diff --git a/test/core/address-offset-range.fail.wast b/test/core/address-offset-range.fail.wast deleted file mode 100644 index 127327a260..0000000000 --- a/test/core/address-offset-range.fail.wast +++ /dev/null @@ -1,4 +0,0 @@ -(module - (memory 1) - (func $bad (drop (i32.load offset=4294967296 (i32.const 0)))) -) diff --git a/test/core/address.wast b/test/core/address.wast index 4f8e349828..47bd21bad8 100644 --- a/test/core/address.wast +++ b/test/core/address.wast @@ -32,3 +32,11 @@ (assert_trap (invoke "good" (i32.const 65508)) "out of bounds memory access") (assert_trap (invoke "bad" (i32.const 0)) "out of bounds memory access") (assert_trap (invoke "bad" (i32.const 1)) "out of bounds memory access") + +(assert_malformed + (module quote + "(memory 1)" + "(func (drop (i32.load offset=4294967296 (i32.const 0))))" + ) + "i32 constant" +) diff --git a/test/core/block-end-label-mismatch.fail.wast b/test/core/block-end-label-mismatch.fail.wast deleted file mode 100644 index 8eeaaff911..0000000000 --- a/test/core/block-end-label-mismatch.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func block $a end $l)) diff --git a/test/core/block-end-label-superfluous.fail.wast b/test/core/block-end-label-superfluous.fail.wast deleted file mode 100644 index f33b8f59f5..0000000000 --- a/test/core/block-end-label-superfluous.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func block end $l)) diff --git a/test/core/block.wast b/test/core/block.wast index 7d51859ca4..f2b6384c3e 100644 --- a/test/core/block.wast +++ b/test/core/block.wast @@ -287,3 +287,13 @@ )) "type mismatch" ) + + +(assert_malformed + (module quote "(func block end $l)") + "mismatching label" +) +(assert_malformed + (module quote "(func block $a end $l)") + "mismatching label" +) diff --git a/test/core/const.wast b/test/core/const.wast new file mode 100644 index 0000000000..9eb591a45e --- /dev/null +++ b/test/core/const.wast @@ -0,0 +1,47 @@ +;; Test t.const instructions + +;; Syntax error + +(module (func (i32.const 0xffffffff) drop)) +(module (func (i32.const -0x80000000) drop)) +(assert_malformed + (module quote "(func (i32.const 0x100000000) drop)") + "constant out of range" +) +(assert_malformed + (module quote "(func (i32.const -0x80000001) drop)") + "constant out of range" +) + +(module (func (i32.const 4294967295) drop)) +(module (func (i32.const -2147483648) drop)) +(assert_malformed + (module quote "(func (i32.const 4294967296) drop)") + "constant out of range" +) +(assert_malformed + (module quote "(func (i32.const -2147483649) drop)") + "constant out of range" +) + +(module (func (i64.const 0xffffffffffffffff) drop)) +(module (func (i64.const -0x8000000000000000) drop)) +(assert_malformed + (module quote "(func (i64.const 0x10000000000000000) drop)") + "constant out of range" +) +(assert_malformed + (module quote "(func (i64.const -0x8000000000000001) drop)") + "constant out of range" +) + +(module (func (i64.const 18446744073709551615) drop)) +(module (func (i64.const -9223372036854775808) drop)) +(assert_malformed + (module quote "(func (i64.const 18446744073709551616) drop)") + "constant out of range" +) +(assert_malformed + (module quote "(func (i64.const -9223372036854775809) drop)") + "constant out of range" +) diff --git a/test/core/f32.load32.fail.wast b/test/core/f32.load32.fail.wast deleted file mode 100644 index 313364538c..0000000000 --- a/test/core/f32.load32.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (result f32) (f32.load32 (get_local 0)))) diff --git a/test/core/f32.load64.fail.wast b/test/core/f32.load64.fail.wast deleted file mode 100644 index da94668fc2..0000000000 --- a/test/core/f32.load64.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (result f32) (f32.load64 (get_local 0)))) diff --git a/test/core/f32.store32.fail.wast b/test/core/f32.store32.fail.wast deleted file mode 100644 index 3daf6eb35e..0000000000 --- a/test/core/f32.store32.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (param f32) (f32.store32 (get_local 0) (get_local 1)))) diff --git a/test/core/f32.store64.fail.wast b/test/core/f32.store64.fail.wast deleted file mode 100644 index b2c47bb9b4..0000000000 --- a/test/core/f32.store64.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (param f64) (f32.store64 (get_local 0) (get_local 1)))) diff --git a/test/core/f64.load32.fail.wast b/test/core/f64.load32.fail.wast deleted file mode 100644 index 38811ff353..0000000000 --- a/test/core/f64.load32.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (result f64) (f64.load32 (get_local 0)))) diff --git a/test/core/f64.load64.fail.wast b/test/core/f64.load64.fail.wast deleted file mode 100644 index f3c30ef345..0000000000 --- a/test/core/f64.load64.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (result f64) (f64.load64 (get_local 0)))) diff --git a/test/core/f64.store32.fail.wast b/test/core/f64.store32.fail.wast deleted file mode 100644 index 92858a35e0..0000000000 --- a/test/core/f64.store32.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (param f32) (f64.store32 (get_local 0) (get_local 1)))) diff --git a/test/core/f64.store64.fail.wast b/test/core/f64.store64.fail.wast deleted file mode 100644 index 2b49017fe1..0000000000 --- a/test/core/f64.store64.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (param f64) (f64.store64 (get_local 0) (get_local 1)))) diff --git a/test/core/func-local-after-body.fail.wast b/test/core/func-local-after-body.fail.wast deleted file mode 100644 index 0c4cf8c3f0..0000000000 --- a/test/core/func-local-after-body.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func (nop) (local i32))) diff --git a/test/core/func-local-before-param.fail.wast b/test/core/func-local-before-param.fail.wast deleted file mode 100644 index 66f35eb6ca..0000000000 --- a/test/core/func-local-before-param.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func (local i32) (param i32))) diff --git a/test/core/func-local-before-result.fail.wast b/test/core/func-local-before-result.fail.wast deleted file mode 100644 index 52026cf765..0000000000 --- a/test/core/func-local-before-result.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func (local i32) (result i32) (get_local 0))) diff --git a/test/core/func-param-after-body.fail.wast b/test/core/func-param-after-body.fail.wast deleted file mode 100644 index 399a151b83..0000000000 --- a/test/core/func-param-after-body.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func (nop) (param i32))) diff --git a/test/core/func-result-after-body.fail.wast b/test/core/func-result-after-body.fail.wast deleted file mode 100644 index 9617a2d00f..0000000000 --- a/test/core/func-result-after-body.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func (nop) (result i32))) diff --git a/test/core/func-result-before-param.fail.wast b/test/core/func-result-before-param.fail.wast deleted file mode 100644 index 93a930f429..0000000000 --- a/test/core/func-result-before-param.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func (result i32) (param i32) (get_local 0))) diff --git a/test/core/func.wast b/test/core/func.wast index 219095befe..41c2e65bae 100644 --- a/test/core/func.wast +++ b/test/core/func.wast @@ -488,3 +488,30 @@ "type mismatch" ) + +;; Syntax errors + +(assert_malformed + (module quote "(func (nop) (local i32))") + "unexpected token" +) +(assert_malformed + (module quote "(func (nop) (param i32))") + "unexpected token" +) +(assert_malformed + (module quote "(func (nop) (result i32))") + "unexpected token" +) +(assert_malformed + (module quote "(func (local i32) (param i32))") + "unexpected token" +) +(assert_malformed + (module quote "(func (local i32) (result i32) (get_local 0))") + "unexpected token" +) +(assert_malformed + (module quote "(func (result i32) (param i32) (get_local 0))") + "unexpected token" +) diff --git a/test/core/i32.load32_s.fail.wast b/test/core/i32.load32_s.fail.wast deleted file mode 100644 index abf38966ad..0000000000 --- a/test/core/i32.load32_s.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (result i32) (i32.load32_s (get_local 0)))) diff --git a/test/core/i32.load32_u.fail.wast b/test/core/i32.load32_u.fail.wast deleted file mode 100644 index 26df00312b..0000000000 --- a/test/core/i32.load32_u.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (result i32) (i32.load32_u (get_local 0)))) diff --git a/test/core/i32.load64_s.fail.wast b/test/core/i32.load64_s.fail.wast deleted file mode 100644 index 78fa012796..0000000000 --- a/test/core/i32.load64_s.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (result i32) (i32.load64_s (get_local 0)))) diff --git a/test/core/i32.load64_u.fail.wast b/test/core/i32.load64_u.fail.wast deleted file mode 100644 index 01e8273e6a..0000000000 --- a/test/core/i32.load64_u.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (result i32) (i32.load64_u (get_local 0)))) diff --git a/test/core/i32.store32.fail.wast b/test/core/i32.store32.fail.wast deleted file mode 100644 index 8a6c528d66..0000000000 --- a/test/core/i32.store32.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (param i32) (i32.store32 (get_local 0) (get_local 1)))) diff --git a/test/core/i32.store64.fail.wast b/test/core/i32.store64.fail.wast deleted file mode 100644 index cb176d23e2..0000000000 --- a/test/core/i32.store64.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (param i64) (i32.store64 (get_local 0) (get_local 1)))) diff --git a/test/core/i64.load64_s.fail.wast b/test/core/i64.load64_s.fail.wast deleted file mode 100644 index 335bac35ab..0000000000 --- a/test/core/i64.load64_s.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (result i64) (i64.load64_s (get_local 0)))) diff --git a/test/core/i64.load64_u.fail.wast b/test/core/i64.load64_u.fail.wast deleted file mode 100644 index b9002e2bf6..0000000000 --- a/test/core/i64.load64_u.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (result i64) (i64.load64_u (get_local 0)))) diff --git a/test/core/i64.store64.fail.wast b/test/core/i64.store64.fail.wast deleted file mode 100644 index 918761f683..0000000000 --- a/test/core/i64.store64.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 1) (func (param i32) (param i64) (i64.store64 (get_local 0) (get_local 1)))) diff --git a/test/core/if-else-end-label-mismatch.fail.wast b/test/core/if-else-end-label-mismatch.fail.wast deleted file mode 100644 index 723f898f7a..0000000000 --- a/test/core/if-else-end-label-mismatch.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func if $a else $l end $l)) diff --git a/test/core/if-else-end-label-superfluous.fail.wast b/test/core/if-else-end-label-superfluous.fail.wast deleted file mode 100644 index bcdb6f6879..0000000000 --- a/test/core/if-else-end-label-superfluous.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func if else $l end $l)) diff --git a/test/core/if-else-label-mismatch.fail.wast b/test/core/if-else-label-mismatch.fail.wast deleted file mode 100644 index 6d9bfdba92..0000000000 --- a/test/core/if-else-label-mismatch.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func if $a else $l end)) diff --git a/test/core/if-else-label-superfluous.fail.wast b/test/core/if-else-label-superfluous.fail.wast deleted file mode 100644 index e678146856..0000000000 --- a/test/core/if-else-label-superfluous.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func if else $l end)) diff --git a/test/core/if-end-label-mismatch.fail.wast b/test/core/if-end-label-mismatch.fail.wast deleted file mode 100644 index 6598d452d2..0000000000 --- a/test/core/if-end-label-mismatch.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func if $a end $l)) diff --git a/test/core/if-end-label-superfluous.fail.wast b/test/core/if-end-label-superfluous.fail.wast deleted file mode 100644 index c111352c01..0000000000 --- a/test/core/if-end-label-superfluous.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func if end $l)) diff --git a/test/core/if.wast b/test/core/if.wast index e80b38d43b..07a9ee2482 100644 --- a/test/core/if.wast +++ b/test/core/if.wast @@ -405,3 +405,45 @@ )) "type mismatch" ) + + +(assert_malformed + (module quote "(func if end $l)") + "mismatching label" +) +(assert_malformed + (module quote "(func if $a end $l)") + "mismatching label" +) +(assert_malformed + (module quote "(func if else $l end)") + "mismatching label" +) +(assert_malformed + (module quote "(func if $a else $l end)") + "mismatching label" +) +(assert_malformed + (module quote "(func if else end $l)") + "mismatching label" +) +(assert_malformed + (module quote "(func if else $l end $l)") + "mismatching label" +) +(assert_malformed + (module quote "(func if else $l1 end $l2)") + "mismatching label" +) +(assert_malformed + (module quote "(func if $a else end $l)") + "mismatching label" +) +(assert_malformed + (module quote "(func if $a else $a end $l)") + "mismatching label" +) +(assert_malformed + (module quote "(func if $a else $l end $l)") + "mismatching label" +) diff --git a/test/core/import-after-func.fail.wast b/test/core/import-after-func.fail.wast deleted file mode 100644 index ece33a72c9..0000000000 --- a/test/core/import-after-func.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func) (import "" "" (memory 0))) diff --git a/test/core/import-after-global.fail.wast b/test/core/import-after-global.fail.wast deleted file mode 100644 index 348ef2703e..0000000000 --- a/test/core/import-after-global.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (global i64 (i64.const 0)) (import "" "" (table 0 anyfunc))) diff --git a/test/core/import-after-memory.fail.wast b/test/core/import-after-memory.fail.wast deleted file mode 100644 index fbe582a934..0000000000 --- a/test/core/import-after-memory.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (memory 0) (import "" "" (global i32))) diff --git a/test/core/import-after-table.fail.wast b/test/core/import-after-table.fail.wast deleted file mode 100644 index bcd747a997..0000000000 --- a/test/core/import-after-table.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (table 0 anyfunc) (import "" "" (func))) diff --git a/test/core/imports.wast b/test/core/imports.wast index 029403bead..69ccd0b5d7 100644 --- a/test/core/imports.wast +++ b/test/core/imports.wast @@ -477,3 +477,74 @@ (assert_return (invoke "grow" (i32.const 0)) (i32.const 2)) (assert_return (invoke "grow" (i32.const 1)) (i32.const -1)) (assert_return (invoke "grow" (i32.const 0)) (i32.const 2)) + + +;; Syntax errors + +(assert_malformed + (module quote "(func) (import \"\" \"\" (func))") + "import after function" +) +(assert_malformed + (module quote "(func) (import \"\" \"\" (global i64))") + "import after function" +) +(assert_malformed + (module quote "(func) (import \"\" \"\" (table 0 anyfunc))") + "import after function" +) +(assert_malformed + (module quote "(func) (import \"\" \"\" (memory 0))") + "import after function" +) + +(assert_malformed + (module quote "(global i64 (i64.const 0)) (import \"\" \"\" (func))") + "import after global" +) +(assert_malformed + (module quote "(global i64 (i64.const 0)) (import \"\" \"\" (global f32))") + "import after global" +) +(assert_malformed + (module quote "(global i64 (i64.const 0)) (import \"\" \"\" (table 0 anyfunc))") + "import after global" +) +(assert_malformed + (module quote "(global i64 (i64.const 0)) (import \"\" \"\" (memory 0))") + "import after global" +) + +(assert_malformed + (module quote "(table 0 anyfunc) (import \"\" \"\" (func))") + "import after table" +) +(assert_malformed + (module quote "(table 0 anyfunc) (import \"\" \"\" (global i32))") + "import after table" +) +(assert_malformed + (module quote "(table 0 anyfunc) (import \"\" \"\" (table 0 anyfunc))") + "import after table" +) +(assert_malformed + (module quote "(table 0 anyfunc) (import \"\" \"\" (memory 0))") + "import after table" +) + +(assert_malformed + (module quote "(memory 0) (import \"\" \"\" (func))") + "import after memory" +) +(assert_malformed + (module quote "(memory 0) (import \"\" \"\" (global i32))") + "import after memory" +) +(assert_malformed + (module quote "(memory 0) (import \"\" \"\" (table 1 3 anyfunc))") + "import after memory" +) +(assert_malformed + (module quote "(memory 0) (import \"\" \"\" (memory 1 2))") + "import after memory" +) diff --git a/test/core/loop-end-label-mismatch.fail.wast b/test/core/loop-end-label-mismatch.fail.wast deleted file mode 100644 index 1ed0104c99..0000000000 --- a/test/core/loop-end-label-mismatch.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func loop $a end $l)) diff --git a/test/core/loop-end-label-superfluous.fail.wast b/test/core/loop-end-label-superfluous.fail.wast deleted file mode 100644 index 85a2ea6f18..0000000000 --- a/test/core/loop-end-label-superfluous.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func loop end $l)) diff --git a/test/core/loop.wast b/test/core/loop.wast index 348061cbfb..d51b70361b 100644 --- a/test/core/loop.wast +++ b/test/core/loop.wast @@ -297,3 +297,13 @@ )) "type mismatch" ) + + +(assert_malformed + (module quote "(func loop end $l)") + "mismatching label" +) +(assert_malformed + (module quote "(func loop $a end $l)") + "mismatching label" +) diff --git a/test/core/memory.wast b/test/core/memory.wast index cf2de6abab..346d8f8fb8 100644 --- a/test/core/memory.wast +++ b/test/core/memory.wast @@ -385,3 +385,147 @@ (assert_return (invoke "i64_load32_s" (i64.const 0x3456436598bacdef)) (i64.const 0xffffffff98bacdef)) (assert_return (invoke "i64_load32_u" (i64.const 0xfedcba9856346543)) (i64.const 0x56346543)) (assert_return (invoke "i64_load32_u" (i64.const 0x3456436598bacdef)) (i64.const 0x98bacdef)) + +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (result i32) (i32.load32 (get_local 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (result i32) (i32.load32_u (get_local 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (result i32) (i32.load32_s (get_local 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (result i32) (i32.load64 (get_local 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (result i32) (i32.load64_u (get_local 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (result i32) (i32.load64_s (get_local 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (i32.store32 (get_local 0) (i32.const 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (i32.store64 (get_local 0) (i64.const 0)))" + ) + "unknown operator" +) + +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (result i64) (i64.load64 (get_local 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (result i64) (i64.load64_u (get_local 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (result i64) (i64.load64_s (get_local 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (i64.store64 (get_local 0) (i64.const 0)))" + ) + "unknown operator" +) + +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (result f32) (f32.load32 (get_local 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (result f32) (f32.load64 (get_local 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (f32.store32 (get_local 0) (f32.const 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (f32.store64 (get_local 0) (f64.const 0)))" + ) + "unknown operator" +) + +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (result f64) (f64.load32 (get_local 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (result f64) (f64.load64 (get_local 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (f64.store32 (get_local 0) (f32.const 0)))" + ) + "unknown operator" +) +(assert_malformed + (module quote + "(memory 1)" + "(func (param i32) (f64.store64 (get_local 0) (f64.const 0)))" + ) + "unknown operator" +) diff --git a/test/core/of_string-overflow-hex-u32.fail.wast b/test/core/of_string-overflow-hex-u32.fail.wast deleted file mode 100644 index 1323a1f0b0..0000000000 --- a/test/core/of_string-overflow-hex-u32.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func (i32.const 0x100000000))) diff --git a/test/core/of_string-overflow-hex-u64.fail.wast b/test/core/of_string-overflow-hex-u64.fail.wast deleted file mode 100644 index d13d6e4b46..0000000000 --- a/test/core/of_string-overflow-hex-u64.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func (i64.const 0x10000000000000000))) diff --git a/test/core/of_string-overflow-s32.fail.wast b/test/core/of_string-overflow-s32.fail.wast deleted file mode 100644 index 4dda960273..0000000000 --- a/test/core/of_string-overflow-s32.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func (i32.const -2147483649))) diff --git a/test/core/of_string-overflow-s64.fail.wast b/test/core/of_string-overflow-s64.fail.wast deleted file mode 100644 index 1034b0b001..0000000000 --- a/test/core/of_string-overflow-s64.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func (i64.const -9223372036854775809))) diff --git a/test/core/of_string-overflow-u32.fail.wast b/test/core/of_string-overflow-u32.fail.wast deleted file mode 100644 index 8f226177bd..0000000000 --- a/test/core/of_string-overflow-u32.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func (i32.const 4294967296))) diff --git a/test/core/of_string-overflow-u64.fail.wast b/test/core/of_string-overflow-u64.fail.wast deleted file mode 100644 index cfa2c46b58..0000000000 --- a/test/core/of_string-overflow-u64.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func (i64.const 18446744073709551616))) diff --git a/test/core/token-keyword-separation.fail.wast b/test/core/token-keyword-separation.fail.wast deleted file mode 100644 index aa29b6d3e2..0000000000 --- a/test/core/token-keyword-separation.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func (drop (i32.const0)))) diff --git a/test/core/token-number-separation.fail.wast b/test/core/token-number-separation.fail.wast deleted file mode 100644 index 68fb517ce6..0000000000 --- a/test/core/token-number-separation.fail.wast +++ /dev/null @@ -1 +0,0 @@ -(module (func br 0drop)) diff --git a/test/core/token.wast b/test/core/token.wast new file mode 100644 index 0000000000..1dcd32e7f7 --- /dev/null +++ b/test/core/token.wast @@ -0,0 +1,10 @@ +;; Test tokenization + +(assert_malformed + (module quote "(func (drop (i32.const0)))") + "unknown operator" +) +(assert_malformed + (module quote "(func br 0drop)") + "unknown operator" +)