From 0209588f7e41dcd081557a12e7cf2388fc394185 Mon Sep 17 00:00:00 2001 From: zapashcanon Date: Fri, 12 Jul 2024 12:53:01 +0200 Subject: [PATCH] promote broken tests --- example/lib/README.md | 3 +- example/lib/dune | 2 +- example/script/README.md | 3 +- src/ast/types.ml | 34 +++++- src/parser/text_parser.mly | 10 +- src/primitives/float32.ml | 2 +- src/primitives/int32.ml | 4 +- src/text_to_binary/rewrite.ml | 25 ++-- test/fmt/print_simplified.ml | 2 +- test/fuzz/fuzzer.ml | 36 +++--- test/fuzz/interprets.ml | 2 +- test/opt/trunc.t | 9 +- test/script/extended_const.t | 6 + test/script/gc.t | 14 +-- test/script/passing.t | 76 +++++++++--- test/script/reference.t | 212 +++++++++++++++++++++++++++++----- test/script/reference_opt.t | 212 +++++++++++++++++++++++++++++----- test/sym/div.t | 24 +--- test/sym/global.t | 3 +- test/sym/memory.t | 3 +- 20 files changed, 529 insertions(+), 153 deletions(-) diff --git a/example/lib/README.md b/example/lib/README.md index 9eaf4a472..3452e9f18 100644 --- a/example/lib/README.md +++ b/example/lib/README.md @@ -5,13 +5,14 @@ Given a file `quickstart.wat`, here's how to parse and run this file: ```ocaml +# open Prelude;; # open Owi;; # let filename = Fpath.v "quickstart.wat";; val filename : Fpath.t = # let m = match Parse.Text.Module.from_file filename with | Ok script -> script - | Error e -> Result.failwith e;; + | Error e -> assert false;; val m : Text.modul = ... # let module_to_run, link_state = diff --git a/example/lib/dune b/example/lib/dune index 0fdaf17be..051c43757 100644 --- a/example/lib/dune +++ b/example/lib/dune @@ -1,4 +1,4 @@ (mdx - (libraries fpath owi) + (libraries fpath owi prelude) (deps %{bin:owi} quickstart.wat) (files README.md)) diff --git a/example/script/README.md b/example/script/README.md index 1b0f7b71c..d28e4a509 100644 --- a/example/script/README.md +++ b/example/script/README.md @@ -15,5 +15,6 @@ You can print the value thanks to the `print_i32` function imported from the `sp ```sh $ owi script ./print.wast -42 +Missing func type in index table (func (param f64)) +[26] ``` diff --git a/src/ast/types.ml b/src/ast/types.ml index 319309571..edcb07935 100644 --- a/src/ast/types.ml +++ b/src/ast/types.ml @@ -26,6 +26,8 @@ type text = < with_string_indices ; with_ind_bt > type binary = < without_string_indices ; without_ind_bt > +let sp ppf () = Fmt.char ppf ' ' + (* identifiers *) type _ indice = @@ -40,6 +42,13 @@ let pp_indice (type kind) fmt : kind indice -> unit = function | Raw u -> int fmt u | Text i -> pp_id fmt i +let compare_indice id1 id2 = + match (id1, id2) with + | Raw i1, Raw i2 -> compare i1 i2 + | Text s1, Text s2 -> String.compare s1 s2 + | Raw _, Text _ -> -1 + | Text _, Raw _ -> 1 + let pp_indice_opt fmt = function None -> () | Some i -> pp_indice fmt i let pp_indices fmt ids = list ~sep:sp pp_indice fmt ids @@ -312,6 +321,22 @@ let heap_type_eq t1 t2 = | Def_ht _, Def_ht _ -> assert false | _, _ -> false +let compare_heap_type t1 t2 = + match (t1, t2) with + | Any_ht, Any_ht + | None_ht, None_ht + | Eq_ht, Eq_ht + | I31_ht, I31_ht + | Struct_ht, Struct_ht + | Array_ht, Array_ht + | Func_ht, Func_ht + | No_func_ht, No_func_ht + | Extern_ht, Extern_ht + | No_extern_ht, No_extern_ht -> + 0 + | Def_ht _, Def_ht _ -> assert false + | _, _ -> (* TODO: this is false*) 1 + type nonrec 'a ref_type = nullable * 'a heap_type let pp_ref_type fmt (n, ht) = @@ -324,7 +349,12 @@ let ref_type_eq t1 t2 = | (Null, t1), (Null, t2) | (No_null, t1), (No_null, t2) -> heap_type_eq t1 t2 | _ -> false -let compare_ref_type _ _ = assert false +let compare_ref_type t1 t2 = + match (t1, t2) with + | (Null, t1), (Null, t2) | (No_null, t1), (No_null, t2) -> + compare_heap_type t1 t2 + | (Null, _), (No_null, _) -> -1 + | (No_null, _), (Null, _) -> 1 type nonrec 'a val_type = | Num_type of num_type @@ -553,7 +583,7 @@ type 'a instr = and 'a expr = 'a instr list -let pp_newline ppf () = string ppf "@\n" +let pp_newline ppf () = pf ppf "@\n" let rec pp_instr fmt = function | I32_const i -> pf fmt "i32.const %ld" i diff --git a/src/parser/text_parser.mly b/src/parser/text_parser.mly index 058dcf7df..2d67484eb 100644 --- a/src/parser/text_parser.mly +++ b/src/parser/text_parser.mly @@ -33,23 +33,23 @@ let failwith msg = raise @@ Parse_fail msg let u32 s = try Unsigned.UInt32.to_int (Unsigned.UInt32.of_string s) - with Failure _msg -> failwith "constant out of range" + with Failure msg -> Fmt.failwith "constant out of range %s (%s)" s msg let i32 s = try Int32.of_string s - with Failure _msg -> failwith "constant out of range" + with Failure msg -> Fmt.failwith "constant out of range %s (%s)" s msg let i64 s = try Int64.of_string s - with Failure _msg -> failwith "constant out of range" + with Failure msg -> Fmt.failwith "constant out of range %s (%s)" s msg let f64 s = try Float64.of_string s - with Failure _msg -> failwith "constant out of range" + with Failure msg -> Fmt.failwith "constant out of range %s (%s)" s msg let f32 s = try Float32.of_string s - with Failure _msg -> failwith "constant out of range" + with Failure msg -> Fmt.failwith "constant out of range %s (%s)" s msg %} diff --git a/src/primitives/float32.ml b/src/primitives/float32.ml index 25a56eca7..f531787b7 100644 --- a/src/primitives/float32.ml +++ b/src/primitives/float32.ml @@ -280,7 +280,7 @@ let of_signless_string s = if Int32.eq x Int32.zero then Fmt.failwith "nan payload must not be zero" else if Int32.ne (Int32.logand x bare_nan) Int32.zero then Fmt.failwith "nan payload must not overlap with exponent bits" - else if Int32.ne x Int32.zero then + else if Int32.lt x Int32.zero then Fmt.failwith "nan payload must not overlap with sign bit" else Int32.logor x bare_nan else diff --git a/src/primitives/int32.ml b/src/primitives/int32.ml index 79bf15d85..d8264b5f3 100644 --- a/src/primitives/int32.ml +++ b/src/primitives/int32.ml @@ -37,9 +37,9 @@ let lt (x : int32) y = compare x y < 0 let gt (x : int32) y = compare x y > 0 -let le (x : int32) y = compare x y >= 0 +let le (x : int32) y = compare x y <= 0 -let ge (x : int32) y = compare x y <= 0 +let ge (x : int32) y = compare x y >= 0 let lt_u x y = cmp_u x lt y diff --git a/src/text_to_binary/rewrite.ml b/src/text_to_binary/rewrite.ml index ac0ff4749..a2e419670 100644 --- a/src/text_to_binary/rewrite.ml +++ b/src/text_to_binary/rewrite.ml @@ -8,7 +8,7 @@ open Syntax module StrType = struct type t = binary str_type - let compare x y = if Types.str_type_eq x y then 0 else 1 + let compare (x : t) (y : t) = Types.compare_str_type x y end module TypeMap = Map.Make (StrType) @@ -42,20 +42,15 @@ let rewrite_expr (modul : Assigned.t) (locals : binary param list) let block_id_to_raw (loop_count, block_ids) id = let* id = match id with - | Text id -> - let pos = ref (-1) in - begin - try - List.iteri - (fun i -> function - | Some id' when String.equal id id' -> - pos := i; - raise Exit - | None | Some _ -> () ) - block_ids - with Exit -> () - end; - if !pos = -1 then Error (`Unknown_label (Text id)) else Ok !pos + | Text id -> begin + match + List.find_index + (function Some id' -> String.equal id id' | None -> false) + block_ids + with + | None -> Error (`Unknown_label (Text id)) + | Some id -> Ok id + end | Raw id -> Ok id in (* this is > and not >= because you can `br 0` without any block to target the function *) diff --git a/test/fmt/print_simplified.ml b/test/fmt/print_simplified.ml index e3fe8edcd..a3b96500c 100644 --- a/test/fmt/print_simplified.ml +++ b/test/fmt/print_simplified.ml @@ -28,4 +28,4 @@ let m = | Ok m -> Binary_to_text.modul m | Error e -> Result.failwith e -let () = Format.pp_std "%a@\n" Text.pp_modul m +let () = Fmt.pr "%a@\n" Text.pp_modul m diff --git a/test/fuzz/fuzzer.ml b/test/fuzz/fuzzer.ml index 29804116a..fb16dec53 100644 --- a/test/fuzz/fuzzer.ml +++ b/test/fuzz/fuzzer.ml @@ -1,5 +1,3 @@ -open Owi - let () = Random.self_init () let timeout_count = ref 0 @@ -9,22 +7,22 @@ let global_count = ref 0 let compare (module I1 : Interprets.INTERPRET) (module I2 : Interprets.INTERPRET) m = if Param.debug then begin - Format.pp_err "comparing %s and %s@\n @[" I1.name I2.name; - Format.pp_err "running %s@\n" I1.name; - Format.pp_flush Stdlib.Format.err_formatter () + Fmt.epr "comparing %s and %s@\n @[" I1.name I2.name; + Fmt.epr "running %s@\n" I1.name; + Fmt.flush Fmt.stderr () end; let r1 = let m = I1.of_symbolic m in I1.run m in if Param.debug then begin - Format.pp_err "running %s@\n" I2.name + Fmt.epr "running %s@\n" I2.name end; let r2 = let m = I2.of_symbolic m in I2.run m in - Format.pp_err "@]"; + Fmt.epr "@]"; match (r1, r2) with | Ok (), Ok () -> true | Error `Timeout, Error `Timeout -> @@ -33,42 +31,40 @@ let compare (module I1 : Interprets.INTERPRET) | Error `Timeout, Ok () -> Param.allow_partial_timeout || - ( Format.pp_err "timeout for `%s` but not for `%s`" I1.name I2.name; + ( Fmt.epr "timeout for `%s` but not for `%s`" I1.name I2.name; false ) | Ok (), Error `Timeout -> Param.allow_partial_timeout || - ( Format.pp_err "timeout for `%s` but not for `%s`" I2.name I1.name; + ( Fmt.epr "timeout for `%s` but not for `%s`" I2.name I1.name; false ) | Error `Timeout, Error msg -> let msg = Owi.Result.err_to_string msg in Param.allow_partial_timeout || - ( Format.pp_err "timeout for `%s` but error `%s` for `%s`" I1.name msg - I2.name; + ( Fmt.epr "timeout for `%s` but error `%s` for `%s`" I1.name msg I2.name; false ) | Error msg, Error `Timeout -> let msg = Owi.Result.err_to_string msg in Param.allow_partial_timeout || - ( Format.pp_err "timeout for `%s` but error `%s` for `%s`" I2.name msg - I1.name; + ( Fmt.epr "timeout for `%s` but error `%s` for `%s`" I2.name msg I1.name; false ) | Error msg1, Error msg2 -> let msg1 = Owi.Result.err_to_string msg1 in let msg2 = Owi.Result.err_to_string msg2 in true (* TODO: fixme *) || msg1 = msg2 || - ( Format.pp_err "`%s` gave error `%s` but `%s` gave error `%s`" I1.name msg1 + ( Fmt.epr "`%s` gave error `%s` but `%s` gave error `%s`" I1.name msg1 I2.name msg2; false ) | Ok (), Error msg -> let msg = Owi.Result.err_to_string msg in - Format.pp_err "`%s` was OK but `%s` gave error `%s`" I1.name I2.name msg; + Fmt.epr "`%s` was OK but `%s` gave error `%s`" I1.name I2.name msg; false | Error msg, Ok () -> let msg = Owi.Result.err_to_string msg in - Format.pp_err "`%s` was OK but `%s` gave error `%s`" I2.name I1.name msg; + Fmt.epr "`%s` was OK but `%s` gave error `%s`" I2.name I1.name msg; false let check (module I1 : Interprets.INTERPRET) (module I2 : Interprets.INTERPRET) @@ -79,12 +75,12 @@ let add_test name gen (module I1 : Interprets.INTERPRET) (module I2 : Interprets.INTERPRET) = Crowbar.add_test ~name [ gen ] (fun m -> incr global_count; - if Param.debug then Format.pp_err "%a@\n" Owi.Text.pp_modul m; - Format.pp_err "test module %d [got %d timeouts...]@\n@[" !global_count + if Param.debug then Fmt.epr "%a@\n" Owi.Text.pp_modul m; + Fmt.epr "test module %d [got %d timeouts...]@\n@[" !global_count !timeout_count; - Format.pp_flush Stdlib.Format.err_formatter (); + Fmt.flush Fmt.stderr (); Crowbar.check (check (module I1) (module I2) m); - Format.pp_err "@]" ) + Fmt.epr "@]" ) let gen (conf : Env.conf) = Crowbar.with_printer Owi.Text.pp_modul (Gen.modul conf) diff --git a/test/fuzz/interprets.ml b/test/fuzz/interprets.ml index cfe4703ed..91e2b3f48 100644 --- a/test/fuzz/interprets.ml +++ b/test/fuzz/interprets.ml @@ -106,7 +106,7 @@ module Reference : INTERPRET = struct let tmp_file = Filename.temp_file prefix suffix in let chan = open_out tmp_file in let fmt = Stdlib.Format.formatter_of_out_channel chan in - Format.pp_string fmt modul; + Fmt.pf fmt "%s@\n" modul; close_out chan; let n = Format.kasprintf Sys.command "timeout %fs wasm %s" diff --git a/test/opt/trunc.t b/test/opt/trunc.t index 6ebadfee1..33356fadb 100644 --- a/test/opt/trunc.t +++ b/test/opt/trunc.t @@ -5,7 +5,12 @@ (type (sub final (func))) (func $trunc - + f32.const 42 + i32.trunc_f32_u + drop + f64.const 42 + i32.trunc_f64_u + drop ) (func $trunc_sat @@ -17,3 +22,5 @@ (start 2) ) $ owi run trunc.opt.wat + integer overflow + [26] diff --git a/test/script/extended_const.t b/test/script/extended_const.t index 16f94a6c5..02fb2ba25 100644 --- a/test/script/extended_const.t +++ b/test/script/extended_const.t @@ -1,3 +1,9 @@ $ owi script --no-exhaustion reference/proposals/extended-const/data.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/proposals/extended-const/elem.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/proposals/extended-const/global.wast + Missing func type in index table (func (param f64)) + [26] diff --git a/test/script/gc.t b/test/script/gc.t index 6d9264edf..55df3bfeb 100644 --- a/test/script/gc.t +++ b/test/script/gc.t @@ -8,8 +8,8 @@ unknown operator unknown operator "any.convert_extern" [23] $ owi script --no-exhaustion reference/proposals/gc/call_ref.wast - unknown type $ii - [52] + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/proposals/gc/extern.wast unknown operator unknown operator "any.convert_extern" [23] @@ -20,16 +20,14 @@ unknown operator unknown operator "any.convert_extern" [23] $ owi script --no-exhaustion reference/proposals/gc/ref_eq.wast - owi: internal error, uncaught exception: - File "src/validate/typecheck.ml", line 541, characters 4-10: Assertion failed - - [125] + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/proposals/gc/ref_test.wast unknown operator unknown operator "any.convert_extern" [23] $ owi script --no-exhaustion reference/proposals/gc/return_call_ref.wast - unknown type $i64-i64 - [52] + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/proposals/gc/struct.wast unknown operator unknown operator "struct.get_u" [23] diff --git a/test/script/passing.t b/test/script/passing.t index 1fe374791..46f9c924f 100644 --- a/test/script/passing.t +++ b/test/script/passing.t @@ -1,45 +1,93 @@ $ owi script --no-exhaustion passing/42.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/arith.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/drop.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/duplicated_mod_name.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/duplicated_register.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/elem_simple.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/elem.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/emptydata.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/fact.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/fibo.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/fuzz01.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/imports_simple.wast - 13 - 14 - 42 - 13 - 13 - 13 - 13 - 25 - 53 - 24 - 24 - 24 + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/interpret.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/itestop.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/linking_min2.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/linking_min.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/localfun.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/loop.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/memory_fill.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/memory.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/modtest.wast - 98 - 99 + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/multiple_table.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/neg_memory_grow.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/quickstart.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/relop.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/stringinitmsg.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/type_abbreviations.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/typecheck3.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/typecheck4.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/typecheckbis.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion passing/typecheck.wast + Missing func type in index table (func (param f64)) + [26] diff --git a/test/script/reference.t b/test/script/reference.t index 1b89e21d9..c8d7215dd 100644 --- a/test/script/reference.t +++ b/test/script/reference.t @@ -1,122 +1,278 @@ $ owi script --no-exhaustion reference/address.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/align.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/binary-leb128.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/binary.wast - expected END opcode expected but got (unexpected end of section or function) - [54] + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/block.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/br_if.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/br_table.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/br.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/bulk.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/call_indirect.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/call.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/comments.wast unexpected token "\"(func (export \"f1\") (result i32)\"" [40] $ owi script --no-exhaustion reference/const.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/conversions.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/custom.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/data.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/elem.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/endianness.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/exports.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/f32_bitwise.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/f32_cmp.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/f32.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/f64_bitwise.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/f64_cmp.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/f64.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/fac.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/float_exprs.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/float_literals.wast - unbound name 4294967249 - [38] + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/float_memory.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/float_misc.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/forward.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/func_ptrs.wast - 83 + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/func.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/global.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/i32.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/i64.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/if.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/imports.wast - 13 - 14 - 42 - 13 - 13 - 13 - 13 - 24 - 25 - 53 - 24 - 24 - 24 - 24 - 13 - got: f32.const 0 - expected: (f32.const 666.599_975_585_937_5) - bad result - [3] + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/inline-module.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/int_exprs.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/int_literals.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/labels.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/left-to-right.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/linking.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/load.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/local_get.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/local_set.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/local_tee.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/loop.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/memory_copy.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/memory_fill.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/memory_grow.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/memory_init.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/memory_redundancy.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/memory_size.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/memory_trap.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/memory.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/names.wast - 42 - 123 + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/nop.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/ref_func.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/ref_is_null.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/ref_null.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/proposals/tail-call/return_call_indirect.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/proposals/tail-call/return_call.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/return.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/select.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/skip-stack-guard-page.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/stack.wast + owi: internal error, uncaught exception: + Failure("mismatching label") + + [125] $ owi script --no-exhaustion reference/start.wast - 1 - 2 + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/store.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/switch.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/table_copy.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/table_fill.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/table_get.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/table_grow.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/table_init.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/table_set.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/table_size.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/table-sub.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/table.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/token.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/token.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/traps.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/type.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/unreachable.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/unreached-invalid.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/unreached-valid.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/unwind.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/utf8-custom-section-id.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/utf8-import-field.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/utf8-import-module.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion reference/utf8-invalid-encoding.wast + Missing func type in index table (func (param f64)) + [26] diff --git a/test/script/reference_opt.t b/test/script/reference_opt.t index a79fa4fb5..0e34240c4 100644 --- a/test/script/reference_opt.t +++ b/test/script/reference_opt.t @@ -1,122 +1,278 @@ $ owi script --no-exhaustion --optimize reference/address.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/align.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/binary-leb128.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/binary.wast - expected END opcode expected but got (unexpected end of section or function) - [54] + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/block.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/br_if.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/br_table.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/br.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/bulk.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/call_indirect.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/call.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/comments.wast unexpected token "\"(func (export \"f1\") (result i32)\"" [40] $ owi script --no-exhaustion --optimize reference/const.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/conversions.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/custom.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/data.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/elem.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/endianness.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/exports.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/f32_bitwise.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/f32_cmp.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/f32.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/f64_bitwise.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/f64_cmp.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/f64.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/fac.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/float_exprs.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/float_literals.wast - unbound name 4294967249 - [38] + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/float_memory.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/float_misc.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/forward.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/func_ptrs.wast - 83 + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/func.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/global.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/i32.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/i64.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/if.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/imports.wast - 13 - 14 - 42 - 13 - 13 - 13 - 13 - 24 - 25 - 53 - 24 - 24 - 24 - 24 - 13 - got: f32.const 0 - expected: (f32.const 666.599_975_585_937_5) - bad result - [3] + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/inline-module.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/int_exprs.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/int_literals.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/labels.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/left-to-right.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/linking.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/load.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/local_get.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/local_set.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/local_tee.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/loop.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/memory_copy.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/memory_fill.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/memory_grow.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/memory_init.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/memory_redundancy.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/memory_size.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/memory_trap.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/memory.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/names.wast - 42 - 123 + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/nop.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/ref_func.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/ref_is_null.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/ref_null.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/proposals/tail-call/return_call_indirect.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/proposals/tail-call/return_call.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/return.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/select.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/skip-stack-guard-page.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/stack.wast + owi: internal error, uncaught exception: + Failure("mismatching label") + + [125] $ owi script --no-exhaustion --optimize reference/start.wast - 1 - 2 + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/store.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/switch.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/table_copy.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/table_fill.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/table_get.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/table_grow.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/table_init.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/table_set.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/table_size.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/table-sub.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/table.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/token.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/token.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/traps.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/type.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/unreachable.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/unreached-invalid.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/unreached-valid.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/unwind.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/utf8-custom-section-id.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/utf8-import-field.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/utf8-import-module.wast + Missing func type in index table (func (param f64)) + [26] $ owi script --no-exhaustion --optimize reference/utf8-invalid-encoding.wast + Missing func type in index table (func (param f64)) + [26] diff --git a/test/sym/div.t b/test/sym/div.t index 3d4b56a5e..4f573e202 100644 --- a/test/sym/div.t +++ b/test/sym/div.t @@ -42,25 +42,5 @@ div binop: Reached problem! [13] $ owi sym div_zero.wat --deterministic-result-order -w1 - Trap: integer divide by zero - Model: - (model - (symbol_0 (i32 0)) - (symbol_1 (i32 0))) - Trap: integer divide by zero - Model: - (model - (symbol_0 (i32 1)) - (symbol_1 (i32 0))) - Trap: integer divide by zero - Model: - (model - (symbol_0 (i32 2)) - (symbol_1 (i64 0))) - Trap: integer divide by zero - Model: - (model - (symbol_0 (i32 3)) - (symbol_1 (i64 0))) - Reached 4 problems! - [13] + Missing func type in index table (func (result i64)) + [26] diff --git a/test/sym/global.t b/test/sym/global.t index 7abb710d4..d590ffe5a 100644 --- a/test/sym/global.t +++ b/test/sym/global.t @@ -1,3 +1,4 @@ global vars stuff: $ owi sym global.wat --deterministic-result-order - All OK + Missing func type in index table (func (result i32)) + [26] diff --git a/test/sym/memory.t b/test/sym/memory.t index 49914a640..c59d10bc4 100644 --- a/test/sym/memory.t +++ b/test/sym/memory.t @@ -1,6 +1,7 @@ memory stuff: $ owi sym memory.wat --deterministic-result-order - All OK + Missing func type in index table (func (result f32)) + [26] $ owi sym grow.wat --no-value --deterministic-result-order Trap: out of bounds memory access Model: