diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/safe-heap_start-function.txt | 11 | ||||
-rw-r--r-- | test/passes/safe-heap_start-function.wast | 9 |
2 files changed, 17 insertions, 3 deletions
diff --git a/test/passes/safe-heap_start-function.txt b/test/passes/safe-heap_start-function.txt index fc5ef831f..58bb77d44 100644 --- a/test/passes/safe-heap_start-function.txt +++ b/test/passes/safe-heap_start-function.txt @@ -13,7 +13,16 @@ (import "env" "segfault" (func $segfault)) (import "env" "alignfault" (func $alignfault)) (memory $0 1 1) - (start $foo) + (start $mystart) + (func $mystart + (i32.store + (i32.load + (i32.const 42) + ) + (i32.const 43) + ) + (call $foo) + ) (func $foo (i32.store (i32.load diff --git a/test/passes/safe-heap_start-function.wast b/test/passes/safe-heap_start-function.wast index ddc947f7e..7fc2d5201 100644 --- a/test/passes/safe-heap_start-function.wast +++ b/test/passes/safe-heap_start-function.wast @@ -1,11 +1,16 @@ (module (memory 1 1) - (func $foo + (func $mystart ;; should not be modified because its the start function + (i32.store (i32.load (i32.const 42)) (i32.const 43)) + (call $foo) + ) + (func $foo + ;; should not be modified because its called from the start function (i32.store (i32.load (i32.const 1234)) (i32.const 5678)) ) (func $bar (i32.store (i32.load (i32.const 1234)) (i32.const 5678)) ) - (start $foo) + (start $mystart) ) |