Skip to content

Commit 49e87dc

Browse files
authored
[test] Add test for init expr with missing end marker (#1645)
1 parent 899ce66 commit 49e87dc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/core/binary.wast

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,19 @@
470470
"section size mismatch"
471471
)
472472

473+
;; Init expression with missing end marker
474+
(assert_malformed
475+
(module binary
476+
"\00asm" "\01\00\00\00"
477+
"\01\04\01\60\00\00" ;; Type section: 1 type
478+
"\03\02\01\00" ;; Function section: 1 function
479+
"\06\05\01\7f\00\41\00" ;; Global section: 1 entry with missing end marker
480+
;; Missing end marker here
481+
"\0a\04\01\02\00\0b" ;; Code section: 1 function
482+
)
483+
"illegal opcode"
484+
)
485+
473486
;; Unsigned LEB128 must not be overlong
474487
(assert_malformed
475488
(module binary

0 commit comments

Comments
 (0)