-
Notifications
You must be signed in to change notification settings - Fork 19
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
12 changed files
with
147 additions
and
22 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
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
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,51 @@ | ||
$ owi wat2wasm call_indirect.wat | ||
$ owi run call_indirect.wasm --debug | ||
typechecking ... | ||
linking ... | ||
interpreting ... | ||
stack : [ ] | ||
running instr: i32.const 0 | ||
stack : [ i32.const 0 ] | ||
running instr: i32.const 0 | ||
stack : [ i32.const 0 ; i32.const 0 ] | ||
running instr: i32.const 1 | ||
stack : [ i32.const 1 ; i32.const 0 ; i32.const 0 ] | ||
running instr: table.init 0 0 | ||
stack : [ ] | ||
running instr: elem.drop 0 | ||
stack : [ ] | ||
stack : [ ] | ||
running instr: call 1 | ||
calling func : func anonymous | ||
stack : [ ] | ||
running instr: i64.const 1 | ||
stack : [ i64.const 1 ] | ||
running instr: i32.const 0 | ||
stack : [ i32.const 0 ; i64.const 1 ] | ||
running instr: call_indirect 126 | ||
owi: internal error, uncaught exception: | ||
Not_found | ||
|
||
[125] | ||
$ owi wasm2wat call_indirect.wasm | ||
(module | ||
|
||
(type (sub final (func (param i64) (result i64)))) | ||
|
||
(type (sub final (func))) | ||
(table 1 10 (ref null func)) | ||
(func (param i64) (result i64) | ||
local.get 0 | ||
i64.const -1 | ||
i64.add | ||
) | ||
(func | ||
i64.const 1 | ||
i32.const 0 | ||
call_indirect 126 | ||
unreachable | ||
drop | ||
) | ||
(elem (table 0) (offset i32.const 0) (ref null func) (item ref.func 0)) | ||
(start 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,21 @@ | ||
(module | ||
(type $sig (func (param i64) (result i64))) | ||
|
||
(table $t0 1 10 funcref) | ||
(elem (i32.const 0) $fct) | ||
|
||
(func $fct (type $sig) | ||
local.get 0 | ||
i64.const -1 | ||
i64.add | ||
) | ||
|
||
(func $start | ||
i64.const 1 | ||
i32.const 0 | ||
call_indirect (type $sig) | ||
drop | ||
) | ||
|
||
(start $start) | ||
) |
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,7 @@ | ||
$ owi wat2wasm symbolic.wat | ||
$ owi sym symbolic.wasm | ||
integer representation too long | ||
[26] | ||
$ owi wasm2wat symbolic.wasm | ||
integer representation too long | ||
[26] |
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,11 @@ | ||
(module | ||
(import "symbolic" "i32_symbol" (func $i32_symbol (result i32))) | ||
|
||
(func $start (local $x i32) | ||
(local.set $x (call $i32_symbol)) | ||
(if (i32.lt_s (i32.const 5) (local.get $x)) (then | ||
unreachable | ||
))) | ||
|
||
(start $start) | ||
) |
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 |
---|---|---|
@@ -1,2 +1,12 @@ | ||
(cram | ||
(deps %{bin:owi} bad.ext func.wat globals.wat loop.wat mem.wat rec.wat)) | ||
(deps | ||
%{bin:owi} | ||
bad.ext | ||
call_indirect.wat | ||
concolic.wat | ||
func.wat | ||
globals.wat | ||
loop.wat | ||
mem.wat | ||
rec.wat | ||
symbolic.wat)) |
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,7 @@ | ||
$ owi wat2wasm concolic.wat | ||
$ owi conc concolic.wasm | ||
integer representation too long | ||
[26] | ||
$ owi wasm2wat concolic.wasm | ||
integer representation too long | ||
[26] |
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,11 @@ | ||
(module | ||
(import "symbolic" "i32_symbol" (func $i32_symbol (result i32))) | ||
|
||
(func $start (local $x i32) | ||
(local.set $x (call $i32_symbol)) | ||
(if (i32.lt_s (i32.const 5) (local.get $x)) (then | ||
unreachable | ||
))) | ||
|
||
(start $start) | ||
) |