Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions test/regress.failures
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
test/regress/ext:threads/atomic_wait32_0.bin.wast
test/regress/ext:threads/atomic_wait64_0.bin.wast
test/regress/binary/bin_func_ref_types0.bin.wast
test/regress/binary/bin_globals1.bin.wast
test/regress/binary/bin_globals2.bin.wast
test/regress/binary/bin_recgrp0.bin.wast
test/regress/binary/bin_recgrp1.bin.wast
test/regress/binary/bin_sub0.bin.wast
test/regress/binary/bin_sub2.bin.wast
2 changes: 1 addition & 1 deletion test/regress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ TESTS="$@"

function run_tests() {
if [ "$TESTS" = "" ]; then
for dir in core gen fastcall; do
for dir in core gen fastcall binary; do
TESTS=$(ls test/regress/$dir/*.bin.wast)
FLAGS=
if [ -e test/regress/$dir/flags ]; then
Expand Down
29 changes: 29 additions & 0 deletions test/regress/binary/bin_bad_sub0.bin.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
;; generated by test/regress/binary/record.sh; do not edit

;; unittest bin:bad_sub0[1]: INVALID ILLEGAL_SUPERTYPE [gc]
(assert_invalid
(module binary
"\00\61\73\6d\01\00\00\00\01\8e\80\80\80\00\02\50"
"\00\60\00\01\7f\50\01\00\60\00\01\7e"
)
"sub type 1 does not match super type 0"
)

;; unittest bin:bad_sub0[2]: INVALID ILLEGAL_SUPERTYPE [gc]
(assert_invalid
(module binary
"\00\61\73\6d\01\00\00\00\01\8c\80\80\80\00\02\50"
"\00\5f\00\50\01\00\60\00\01\7c"
)
"sub type 1 does not match super type 0"
)

;; unittest bin:bad_sub0[3]: INVALID ILLEGAL_SUPERTYPE [gc]
(assert_invalid
(module binary
"\00\61\73\6d\01\00\00\00\01\8d\80\80\80\00\02\50"
"\00\5e\78\00\50\01\00\60\00\01\7d"
)
"sub type 1 does not match super type 0"
)

29 changes: 29 additions & 0 deletions test/regress/binary/bin_bad_sub1.bin.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
;; generated by test/regress/binary/record.sh; do not edit

;; unittest bin:bad_sub1[1]: INVALID ILLEGAL_SUPERTYPE [gc]
(assert_invalid
(module binary
"\00\61\73\6d\01\00\00\00\01\8c\80\80\80\00\02\50"
"\00\5f\01\78\00\50\01\00\5f\00"
)
"sub type 1 does not match super type 0"
)

;; unittest bin:bad_sub1[2]: INVALID ILLEGAL_SUPERTYPE [gc]
(assert_invalid
(module binary
"\00\61\73\6d\01\00\00\00\01\8c\80\80\80\00\02\50"
"\00\60\00\01\7c\50\01\00\5f\00"
)
"sub type 1 does not match super type 0"
)

;; unittest bin:bad_sub1[3]: INVALID ILLEGAL_SUPERTYPE [gc]
(assert_invalid
(module binary
"\00\61\73\6d\01\00\00\00\01\8c\80\80\80\00\02\50"
"\00\60\00\01\7d\50\01\00\5f\00"
)
"sub type 1 does not match super type 0"
)

29 changes: 29 additions & 0 deletions test/regress/binary/bin_bad_sub2.bin.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
;; generated by test/regress/binary/record.sh; do not edit

;; unittest bin:bad_sub2[1]: INVALID ILLEGAL_SUPERTYPE [gc]
(assert_invalid
(module binary
"\00\61\73\6d\01\00\00\00\01\8c\80\80\80\00\02\50"
"\00\5e\78\00\50\01\00\5e\77\00"
)
"sub type 1 does not match super type 0"
)

;; unittest bin:bad_sub2[2]: INVALID ILLEGAL_SUPERTYPE [gc]
(assert_invalid
(module binary
"\00\61\73\6d\01\00\00\00\01\8b\80\80\80\00\02\50"
"\00\5f\00\50\01\00\5e\78\00"
)
"sub type 1 does not match super type 0"
)

;; unittest bin:bad_sub2[3]: INVALID ILLEGAL_SUPERTYPE [gc]
(assert_invalid
(module binary
"\00\61\73\6d\01\00\00\00\01\8d\80\80\80\00\02\50"
"\00\60\00\01\7d\50\01\00\5e\78\00"
)
"sub type 1 does not match super type 0"
)

29 changes: 29 additions & 0 deletions test/regress/binary/bin_bad_sub3.bin.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
;; generated by test/regress/binary/record.sh; do not edit

;; unittest bin:bad_sub3[1]: INVALID ILLEGAL_SUPERTYPE [gc]
(assert_invalid
(module binary
"\00\61\73\6d\01\00\00\00\01\88\80\80\80\00\02\5f"
"\00\50\01\00\5f\00"
)
"sub type 1 has final super type 0"
)

;; unittest bin:bad_sub3[2]: INVALID ILLEGAL_SUPERTYPE [gc]
(assert_invalid
(module binary
"\00\61\73\6d\01\00\00\00\01\8a\80\80\80\00\02\5e"
"\78\00\50\01\00\5e\78\00"
)
"sub type 1 has final super type 0"
)

;; unittest bin:bad_sub3[3]: INVALID ILLEGAL_SUPERTYPE [gc]
(assert_invalid
(module binary
"\00\61\73\6d\01\00\00\00\01\8c\80\80\80\00\02\60"
"\00\01\7f\50\01\00\60\00\01\7f"
)
"sub type 1 has final super type 0"
)

7 changes: 7 additions & 0 deletions test/regress/binary/bin_buf_offset.bin.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
;; generated by test/regress/binary/record.sh; do not edit

;; unittest bin:buf_offset[1]: VALID [none]
(module definition binary
"\00\61\73\6d\01\00\00\00"
)

32 changes: 32 additions & 0 deletions test/regress/binary/bin_code0.bin.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
;; generated by test/regress/binary/record.sh; do not edit

;; unittest bin:code0[1]: MALFORMED FUNC_COUNT_MISMATCH [none]
(assert_malformed
(module binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\02"
"\01\00\0a\81\80\80\80\00\00"
)
"function and code section have inconsistent lengths"
)

;; unittest bin:code0[2]: VALID [none]
(module definition binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\02"
"\01\00\0a\84\80\80\80\00\01\02\00\0b"
)

;; unittest bin:code0[3]: VALID [none]
(module definition binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\02"
"\01\00\0a\85\80\80\80\00\01\03\00\01\0b"
)

;; unittest bin:code0[4]: MALFORMED FUNC_COUNT_MISMATCH [none]
(assert_malformed
(module binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\02"
"\01\00\0a\83\80\80\80\00\02\00\00"
)
"unexpected end of section or function"
)

47 changes: 47 additions & 0 deletions test/regress/binary/bin_code1.bin.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
;; generated by test/regress/binary/record.sh; do not edit

;; unittest bin:code1[1]: MALFORMED FUNC_COUNT_MISMATCH [none]
(assert_malformed
(module binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\84"
"\80\80\80\00\03\00\00\00\0a\81\80\80\80\00\00"
)
"function and code section have inconsistent lengths"
)

;; unittest bin:code1[2]: MALFORMED FUNC_COUNT_MISMATCH [none]
(assert_malformed
(module binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\84"
"\80\80\80\00\03\00\00\00\0a\82\80\80\80\00\01\00"
)
"unexpected end of section or function"
)

;; unittest bin:code1[3]: MALFORMED FUNC_COUNT_MISMATCH [none]
(assert_malformed
(module binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\84"
"\80\80\80\00\03\00\00\00\0a\83\80\80\80\00\02\00"
"\00"
)
"unexpected end of section or function"
)

;; unittest bin:code1[4]: VALID [none]
(module definition binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\84"
"\80\80\80\00\03\00\00\00\0a\8a\80\80\80\00\03\02"
"\00\0b\02\00\0b\02\00\0b"
)

;; unittest bin:code1[5]: MALFORMED FUNC_COUNT_MISMATCH [none]
(assert_malformed
(module binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\84"
"\80\80\80\00\03\00\00\00\0a\85\80\80\80\00\04\00"
"\00\00\00"
)
"unexpected end of section or function"
)

56 changes: 56 additions & 0 deletions test/regress/binary/bin_code2.bin.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
;; generated by test/regress/binary/record.sh; do not edit

;; unittest bin:code2[1]: VALID [none]
(module definition binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\82"
"\80\80\80\00\01\00\0a\84\80\80\80\00\01\02\00\0b"
)

;; unittest bin:code2[2]: MALFORMED INCOMPLETE_FUNCTION_BODY [none]
(assert_malformed
(module binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\82"
"\80\80\80\00\01\00\0a\81\80\80\80\00\01"
)
"unexpected end of section or function"
)

;; unittest bin:code2[3]: MALFORMED INCOMPLETE_FUNCTION_BODY [none]
(assert_malformed
(module binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\82"
"\80\80\80\00\01\00\0a\83\80\80\80\00\01\02\00"
)
"unexpected end of section or function"
)

;; unittest bin:code2[4]: MALFORMED INCOMPLETE_FUNCTION_BODY [none]
(assert_malformed
(module binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\82"
"\80\80\80\00\01\00\0a\82\80\80\80\00\01\42"
)
"length out of bounds"
)

;; unittest bin:code2[5]: MALFORMED INCOMPLETE_FUNCTION_BODY [none]
(assert_malformed
(module binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\82"
"\80\80\80\00\01\00\0a\85\80\80\80\00\01\b0\97\d3"
"\03"
)
"length out of bounds"
)

;; unittest bin:code2[6]: MALFORMED INCOMPLETE_FUNCTION_BODY [none]
(assert_malformed
(module binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\82"
"\80\80\80\00\01\00\0a\85\80\80\80\00\01\b1\97\d3"
"\03"
)
"length out of bounds"
)

;; skipped: EXCEEDED_LIMIT is an engine-specific limit
11 changes: 11 additions & 0 deletions test/regress/binary/bin_code_missing.bin.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
;; generated by test/regress/binary/record.sh; do not edit

;; unittest bin:code_missing[1]: MALFORMED FUNC_COUNT_MISMATCH [none]
(assert_malformed
(module binary
"\00\61\73\6d\01\00\00\00\01\04\01\60\00\00\03\82"
"\80\80\80\00\01\00"
)
"function and code section have inconsistent lengths"
)

Loading
Loading