-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(module | ||
(func (export "_start") | ||
;; memory.grow here is expected to fail because it's already max-sized. | ||
i32.const 1 | ||
memory.grow 0 | ||
i32.const -1 | ||
i32.ne | ||
if | ||
unreachable | ||
end | ||
|
||
memory.size 0 | ||
i32.const -1 | ||
i32.ne | ||
if | ||
unreachable | ||
end | ||
) | ||
(memory 0xffffffff (pagesize 1)) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(module | ||
(func (export "_start")) | ||
(memory 0x10000 0x10000 (pagesize 65536)) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
(module | ||
(func (export "i32-ok") | ||
i32.const 27 | ||
i32.load | ||
drop | ||
) | ||
(func $i32-trap (export "i32-trap") | ||
i32.const 28 | ||
i32.load | ||
drop | ||
) | ||
(func (export "i8-ok") | ||
i32.const 30 | ||
i32.load8_u | ||
drop | ||
) | ||
(func (export "i8-trap") | ||
i32.const 31 | ||
i32.load8_u | ||
drop | ||
) | ||
(func (export "i32-ok-after-grow") | ||
i32.const 1 | ||
memory.grow | ||
i32.const -1 | ||
i32.eq | ||
if | ||
unreachable | ||
end | ||
call $i32-trap | ||
) | ||
(memory 31 (pagesize 1)) | ||
) |