Skip to content
Merged
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/core/br.wast
Original file line number Diff line number Diff line change
Expand Up @@ -655,3 +655,10 @@
(module (func $large-label (br 0x10000001)))
"unknown label"
)

;; Malformed: the index does not fit in u32

(assert_malformed
(module quote "(func (block (br 4294967296)))")
"i32 constant out of range"
)
16 changes: 16 additions & 0 deletions test/core/call.wast
Original file line number Diff line number Diff line change
Expand Up @@ -516,3 +516,19 @@
(module (func $large-func (call 1012321300)))
"unknown function"
)

(assert_invalid
(module (func $max-func (call 4294967295)))
"unknown function"
)

;; Malformed: the index does not fit in u32

(assert_malformed
(module quote "(func (call 4294967296))")
"i32 constant out of range"
)
(assert_malformed
(module quote "(func (call 0x1_0000_0000))")
"i32 constant out of range"
)
8 changes: 8 additions & 0 deletions test/core/gc/array.wast
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,14 @@
"constant expression required"
)

(assert_malformed
(module quote
"(type $a (array i32))"
"(func (array.new_fixed $a 4294967296) drop)"
)
"i32 constant out of range"
)


;; Null dereference

Expand Down
8 changes: 8 additions & 0 deletions test/core/gc/struct.wast
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@
"immutable field"
)

(assert_malformed
(module quote
"(type $s (struct (field i32)))"
"(func (param (ref $s)) (struct.get $s 4294967296 (local.get 0)) drop)"
)
"i32 constant out of range"
)


;; Null dereference

Expand Down
Loading