Skip to content

Commit

Permalink
[gc] Add failing element test and update regression failures
Browse files Browse the repository at this point in the history
  • Loading branch information
titzer authored Sep 18, 2024
2 parents 0a1a32e + 2f3339a commit 43796bd
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 29 deletions.
5 changes: 1 addition & 4 deletions test/regress.failures
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
test/regress/core/elem.bin.wast
test/regress/core/import00.bin.wast
test/regress/ext:gc/array_new_fixed.bin.wast
test/regress/ext:gc/br_on_non2.bin.wast
test/regress/ext:gc/br_on_non.bin.wast
test/regress/ext:gc/ref_eq.bin.wast
test/regress/ext:gc/elem0.bin.wast
test/regress/ext:threads/atomic_load_i32.bin.wast
test/regress/ext:threads/atomic_store_i32.bin.wast
test/regress/ext:threads/atomic_add_i32.bin.wast
Expand Down
10 changes: 10 additions & 0 deletions test/regress/ext:gc/elem0.bin.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(assert_invalid
(module binary
"\00\61\73\6d\01\00\00\00\01\84\80\80\80\00\01\60"
"\00\00\03\82\80\80\80\00\01\00\04\8a\80\80\80\00"
"\01\40\00\64\70\00\01\d2\00\0b\09\89\80\80\80\00"
"\01\04\41\00\0b\01\d2\00\0b\0a\88\80\80\80\00\01"
"\82\80\80\80\00\00\0b"
)
"type mismatch"
)
8 changes: 8 additions & 0 deletions test/regress/ext:gc/elem0.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(assert_invalid
(module
(func)
(table 1 (ref func) (ref.func 0))
(elem (i32.const 0) funcref (ref.func 0))
)
"type mismatch"
)
36 changes: 18 additions & 18 deletions test/regress/ext:gc/type-subtyping.bin.wast
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@
"\03\05\66\61\69\6c\31\00\04\05\66\61\69\6c\32\00"
"\05\05\66\61\69\6c\33\00\06\05\66\61\69\6c\34\00"
"\07\05\66\61\69\6c\35\00\08\05\66\61\69\6c\36\00"
"\09\09\91\80\80\80\00\01\06\00\41\00\0b\70\03\d2"
"\00\0b\d2\01\0b\d2\02\0b\0a\80\82\80\80\00\0a\84"
"\80\80\80\00\00\d0\70\0b\84\80\80\80\00\00\d0\01"
"\0b\84\80\80\80\00\00\d0\02\0b\f9\80\80\80\00\00"
"\02\70\41\00\11\00\00\0b\02\70\41\01\11\00\00\0b"
"\02\70\41\02\11\00\00\0b\02\63\01\41\01\11\01\00"
"\0b\02\63\01\41\02\11\01\00\0b\02\63\02\41\02\11"
"\02\00\0b\02\63\00\41\00\25\00\fb\16\00\0b\02\63"
"\00\41\01\25\00\fb\16\00\0b\02\63\00\41\02\25\00"
"\fb\16\00\0b\02\63\01\41\01\25\00\fb\16\01\0b\02"
"\63\01\41\02\25\00\fb\16\01\0b\02\63\02\41\02\25"
"\00\fb\16\02\0b\0c\00\0b\8d\80\80\80\00\00\02\63"
"\01\41\00\11\01\00\0b\0c\00\0b\8d\80\80\80\00\00"
"\02\63\01\41\00\11\02\00\0b\0c\00\0b\8d\80\80\80"
"\00\00\02\63\01\41\01\11\02\00\0b\0c\00\0b\8b\80"
"\80\80\00\00\41\00\25\00\fb\16\01\0c\00\0b\8b\80"
"\80\80\00\00\41\00\25\00\fb\16\02\0c\00\0b\8b\80"
"\80\80\00\00\41\01\25\00\fb\16\02\0c\00\0b"
"\09\09\8f\80\80\80\00\01\04\41\00\0b\03\d2\00\0b"
"\d2\01\0b\d2\02\0b\0a\80\82\80\80\00\0a\84\80\80"
"\80\00\00\d0\70\0b\84\80\80\80\00\00\d0\01\0b\84"
"\80\80\80\00\00\d0\02\0b\f9\80\80\80\00\00\02\70"
"\41\00\11\00\00\0b\02\70\41\01\11\00\00\0b\02\70"
"\41\02\11\00\00\0b\02\63\01\41\01\11\01\00\0b\02"
"\63\01\41\02\11\01\00\0b\02\63\02\41\02\11\02\00"
"\0b\02\63\00\41\00\25\00\fb\16\00\0b\02\63\00\41"
"\01\25\00\fb\16\00\0b\02\63\00\41\02\25\00\fb\16"
"\00\0b\02\63\01\41\01\25\00\fb\16\01\0b\02\63\01"
"\41\02\25\00\fb\16\01\0b\02\63\02\41\02\25\00\fb"
"\16\02\0b\0c\00\0b\8d\80\80\80\00\00\02\63\01\41"
"\00\11\01\00\0b\0c\00\0b\8d\80\80\80\00\00\02\63"
"\01\41\00\11\02\00\0b\0c\00\0b\8d\80\80\80\00\00"
"\02\63\01\41\01\11\02\00\0b\0c\00\0b\8b\80\80\80"
"\00\00\41\00\25\00\fb\16\01\0c\00\0b\8b\80\80\80"
"\00\00\41\00\25\00\fb\16\02\0c\00\0b\8b\80\80\80"
"\00\00\41\01\25\00\fb\16\02\0c\00\0b"
)
(assert_return (invoke "run"))
(assert_trap (invoke "fail1") "indirect call")
Expand Down
14 changes: 7 additions & 7 deletions test/regress/ext:gc/type-subtyping1.bin.wast
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"\01\01\01\01\04\85\80\80\80\00\01\70\01\02\02\07"
"\a1\80\80\80\00\04\05\66\61\69\6c\31\00\02\05\66"
"\61\69\6c\32\00\03\05\66\61\69\6c\33\00\04\05\66"
"\61\69\6c\34\00\05\09\8e\80\80\80\00\01\06\00\41"
"\00\0b\70\02\d2\00\0b\d2\01\0b\0a\cb\80\80\80\00"
"\06\82\80\80\80\00\00\0b\82\80\80\80\00\00\0b\8a"
"\80\80\80\00\00\02\40\41\01\11\00\00\0b\0b\8a\80"
"\80\80\00\00\02\40\41\00\11\01\00\0b\0b\8a\80\80"
"\80\00\00\41\01\25\00\fb\16\00\1a\0b\8a\80\80\80"
"\00\00\41\00\25\00\fb\16\01\1a\0b"
"\61\69\6c\34\00\05\09\8c\80\80\80\00\01\04\41\00"
"\0b\02\d2\00\0b\d2\01\0b\0a\cb\80\80\80\00\06\82"
"\80\80\80\00\00\0b\82\80\80\80\00\00\0b\8a\80\80"
"\80\00\00\02\40\41\01\11\00\00\0b\0b\8a\80\80\80"
"\00\00\02\40\41\00\11\01\00\0b\0b\8a\80\80\80\00"
"\00\41\01\25\00\fb\16\00\1a\0b\8a\80\80\80\00\00"
"\41\00\25\00\fb\16\01\1a\0b"
)
(assert_trap (invoke "fail1") "indirect call")
(assert_trap (invoke "fail2") "indirect call")
Expand Down

0 comments on commit 43796bd

Please sign in to comment.