-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #751 from yamt/bounds-check
native runtime: implement memory bounds check
- Loading branch information
Showing
9 changed files
with
163 additions
and
5 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
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,13 @@ | ||
(module | ||
(func $blit (import "env" "blit") (param i32 i32 i32 i32 i32 i32)) | ||
(memory (import "env" "memory") 1 1) | ||
(func (export "update") | ||
i32.const 0 | ||
i32.const 0 | ||
i32.const 0 | ||
i32.const 0x10 | ||
i32.const 0x10000001 | ||
i32.const 0 | ||
call $blit | ||
) | ||
) |
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,13 @@ | ||
(module | ||
(func $blit (import "env" "blit") (param i32 i32 i32 i32 i32 i32)) | ||
(memory (import "env" "memory") 1 1) | ||
(func (export "update") | ||
i32.const 0 | ||
i32.const 0 | ||
i32.const 0 | ||
i32.const 0x8 | ||
i32.const 0x10000001 | ||
i32.const 1 | ||
call $blit | ||
) | ||
) |
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,13 @@ | ||
(module | ||
(func $blit (import "env" "blit") (param i32 i32 i32 i32 i32 i32)) | ||
(memory (import "env" "memory") 1 1) | ||
(func (export "update") | ||
i32.const 65529 | ||
i32.const 0 | ||
i32.const 0 | ||
i32.const 8 | ||
i32.const 8 | ||
i32.const 0 | ||
call $blit | ||
) | ||
) |
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,13 @@ | ||
(module | ||
(func $blit (import "env" "blit") (param i32 i32 i32 i32 i32 i32)) | ||
(memory (import "env" "memory") 1 1) | ||
(func (export "update") | ||
i32.const 65521 | ||
i32.const 0 | ||
i32.const 0 | ||
i32.const 8 | ||
i32.const 8 | ||
i32.const 1 | ||
call $blit | ||
) | ||
) |
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,10 @@ | ||
(module | ||
(func $tracef (import "env" "tracef") (param i32 i32)) | ||
(memory (import "env" "memory") 1 1) | ||
(func (export "update") | ||
i32.const 50000 | ||
i32.const 65529 | ||
call $tracef | ||
) | ||
(data (i32.const 50000) "%f\00") | ||
) |
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,10 @@ | ||
(module | ||
(func $tracef (import "env" "tracef") (param i32 i32)) | ||
(memory (import "env" "memory") 1 1) | ||
(func (export "update") | ||
i32.const 65533 | ||
i32.const 0 | ||
call $tracef | ||
) | ||
(data (i32.const 65533) "xxx") | ||
) |
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,15 @@ | ||
(module | ||
(func $tracef (import "env" "tracef") (param i32 i32)) | ||
(memory (import "env" "memory") 1 1) | ||
(func (export "update") | ||
i32.const 40000 | ||
i32.const 65533 | ||
i32.store | ||
|
||
i32.const 50000 | ||
i32.const 40000 | ||
call $tracef | ||
) | ||
(data (i32.const 50000) "%s\00") | ||
(data (i32.const 65533) "xxx") | ||
) |
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,10 @@ | ||
(module | ||
(func $tracef (import "env" "tracef") (param i32 i32)) | ||
(memory (import "env" "memory") 1 1) | ||
(func (export "update") | ||
i32.const 50000 | ||
i32.const 65533 | ||
call $tracef | ||
) | ||
(data (i32.const 50000) "%s\00") | ||
) |