summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/crash/expression-past-end-of-input.wasmbin0 -> 670 bytes
-rw-r--r--test/ctor-eval/imported-min.wast4
-rw-r--r--test/ctor-eval/imported-min.wast.out3
-rw-r--r--test/ctor-eval/imported.wast3
-rw-r--r--test/ctor-eval/imported.wast.out3
-rw-r--r--test/ctor-eval/imported3.wast2
-rw-r--r--test/ctor-eval/imported3.wast.out2
-rw-r--r--test/ctor-eval/unsafe_call.wast2
-rw-r--r--test/ctor-eval/unsafe_call.wast.out2
-rw-r--r--test/ctor-eval/unsafe_store.wast2
-rw-r--r--test/ctor-eval/unsafe_store.wast.out2
-rw-r--r--test/ctor-eval/unsafe_store2.wast2
-rw-r--r--test/ctor-eval/unsafe_store2.wast.out2
-rw-r--r--test/ctor-eval/unsafe_store3.wast2
-rw-r--r--test/ctor-eval/unsafe_store3.wast.out2
15 files changed, 8 insertions, 25 deletions
diff --git a/test/crash/expression-past-end-of-input.wasm b/test/crash/expression-past-end-of-input.wasm
new file mode 100644
index 000000000..4652a83a5
--- /dev/null
+++ b/test/crash/expression-past-end-of-input.wasm
Binary files differ
diff --git a/test/ctor-eval/imported-min.wast b/test/ctor-eval/imported-min.wast
index 8972a2ee1..80f2cbde2 100644
--- a/test/ctor-eval/imported-min.wast
+++ b/test/ctor-eval/imported-min.wast
@@ -4,8 +4,8 @@
;; stack imports are special
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
- ;; other imports must not be touched!
(import "env" "tempDoublePtr" (global $tempDoublePtr i32))
+ (global $tempDoublePtrMut (mut i32) (get_global $tempDoublePtr))
(export "test1" $test1)
(export "test2" $test2)
(export "test3" $test3)
@@ -39,7 +39,7 @@
(i32.store8 (i32.const 12) (i32.const 115))
)
(func $test2
- (set_global $tempDoublePtr (i32.const 1)) ;; bad!
+ (set_global $tempDoublePtrMut (i32.const 1)) ;; bad!
(i32.store8 (i32.const 13) (i32.const 115))
)
(func $test3
diff --git a/test/ctor-eval/imported-min.wast.out b/test/ctor-eval/imported-min.wast.out
index 3871caf2f..7b5c069ec 100644
--- a/test/ctor-eval/imported-min.wast.out
+++ b/test/ctor-eval/imported-min.wast.out
@@ -1,12 +1,13 @@
(module
(type $0 (func))
(import "env" "tempDoublePtr" (global $tempDoublePtr i32))
+ (global $tempDoublePtrMut (mut i32) (get_global $tempDoublePtr))
(memory $0 256 256)
(data (i32.const 10) "wasa waka waka waka waka")
(export "test2" (func $test2))
(export "test3" (func $test3))
(func $test2 (; 0 ;) (type $0)
- (set_global $tempDoublePtr
+ (set_global $tempDoublePtrMut
(i32.const 1)
)
(i32.store8
diff --git a/test/ctor-eval/imported.wast b/test/ctor-eval/imported.wast
index 3f065377d..982beacbe 100644
--- a/test/ctor-eval/imported.wast
+++ b/test/ctor-eval/imported.wast
@@ -6,6 +6,7 @@
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
;; other imports must not be touched!
(import "env" "tempDoublePtr" (global $tempDoublePtr i32))
+ (global $tempDoublePtrMut (mut i32) (get_global $tempDoublePtr))
(export "test1" $test1)
(export "test2" $test2)
(export "test3" $test3)
@@ -36,7 +37,7 @@
(i32.store8 (i32.const 12) (i32.const 115))
)
(func $test2
- (set_global $tempDoublePtr (i32.const 1)) ;; bad!
+ (set_global $tempDoublePtrMut (i32.const 1)) ;; bad!
(i32.store8 (i32.const 13) (i32.const 115))
)
(func $test3
diff --git a/test/ctor-eval/imported.wast.out b/test/ctor-eval/imported.wast.out
index 3871caf2f..7b5c069ec 100644
--- a/test/ctor-eval/imported.wast.out
+++ b/test/ctor-eval/imported.wast.out
@@ -1,12 +1,13 @@
(module
(type $0 (func))
(import "env" "tempDoublePtr" (global $tempDoublePtr i32))
+ (global $tempDoublePtrMut (mut i32) (get_global $tempDoublePtr))
(memory $0 256 256)
(data (i32.const 10) "wasa waka waka waka waka")
(export "test2" (func $test2))
(export "test3" (func $test3))
(func $test2 (; 0 ;) (type $0)
- (set_global $tempDoublePtr
+ (set_global $tempDoublePtrMut
(i32.const 1)
)
(i32.store8
diff --git a/test/ctor-eval/imported3.wast b/test/ctor-eval/imported3.wast
index b43ce3038..bd70a6f11 100644
--- a/test/ctor-eval/imported3.wast
+++ b/test/ctor-eval/imported3.wast
@@ -4,8 +4,6 @@
;; imports must not be used
(import "env" "tempDoublePtr" (global $tempDoublePtr i32))
(export "test1" $test1)
- (export "test2" $test2)
- (export "test3" $test3)
(global $mine (mut i32) (get_global $tempDoublePtr)) ;; BAD, if used
(func $test1
(drop (get_global $mine))
diff --git a/test/ctor-eval/imported3.wast.out b/test/ctor-eval/imported3.wast.out
index 0cbf32cea..101c1adaa 100644
--- a/test/ctor-eval/imported3.wast.out
+++ b/test/ctor-eval/imported3.wast.out
@@ -3,8 +3,6 @@
(memory $0 256 256)
(data (i32.const 10) "waka waka waka waka waka")
(export "test1" (func $test1))
- (export "test2" (func $test2))
- (export "test3" (func $test3))
(func $test1 (; 0 ;) (type $0)
(i32.store8
(i32.const 13)
diff --git a/test/ctor-eval/unsafe_call.wast b/test/ctor-eval/unsafe_call.wast
index 703760744..a3dff7c19 100644
--- a/test/ctor-eval/unsafe_call.wast
+++ b/test/ctor-eval/unsafe_call.wast
@@ -2,8 +2,6 @@
(memory 256 256)
(data (i32.const 10) "waka waka waka waka waka")
(export "test1" $test1)
- (export "test2" $test2)
- (export "test3" $test3)
(func $test1
(call $unsafe-to-call) ;; unsafe to call
(i32.store (i32.const 12) (i32.const 115)) ;; a safe store, should alter memory
diff --git a/test/ctor-eval/unsafe_call.wast.out b/test/ctor-eval/unsafe_call.wast.out
index 5a16a6112..d92a4cd2f 100644
--- a/test/ctor-eval/unsafe_call.wast.out
+++ b/test/ctor-eval/unsafe_call.wast.out
@@ -3,8 +3,6 @@
(memory $0 256 256)
(data (i32.const 10) "waka waka waka waka waka")
(export "test1" (func $test1))
- (export "test2" (func $test2))
- (export "test3" (func $test3))
(func $test1 (; 0 ;) (type $0)
(call $unsafe-to-call)
(i32.store
diff --git a/test/ctor-eval/unsafe_store.wast b/test/ctor-eval/unsafe_store.wast
index f851672a7..296363b35 100644
--- a/test/ctor-eval/unsafe_store.wast
+++ b/test/ctor-eval/unsafe_store.wast
@@ -2,8 +2,6 @@
(memory 256 256)
(data (i32.const 10) "waka waka waka waka waka")
(export "test1" $test1)
- (export "test2" $test2)
- (export "test3" $test3)
(func $test1
(i32.store8 (i32.const 9) (i32.const 109)) ;; before first segment
)
diff --git a/test/ctor-eval/unsafe_store.wast.out b/test/ctor-eval/unsafe_store.wast.out
index e51bd298d..4427f36e0 100644
--- a/test/ctor-eval/unsafe_store.wast.out
+++ b/test/ctor-eval/unsafe_store.wast.out
@@ -1,4 +1,2 @@
(module
- (export "test2" (func $test2))
- (export "test3" (func $test3))
)
diff --git a/test/ctor-eval/unsafe_store2.wast b/test/ctor-eval/unsafe_store2.wast
index cc5eb1105..5272c8333 100644
--- a/test/ctor-eval/unsafe_store2.wast
+++ b/test/ctor-eval/unsafe_store2.wast
@@ -2,8 +2,6 @@
(memory 256 256)
(data (i32.const 10) "waka waka waka waka waka")
(export "test1" $test1)
- (export "test2" $test2)
- (export "test3" $test3)
(func $test1
(i32.store8 (i32.const 34) (i32.const 109)) ;; after last segment
)
diff --git a/test/ctor-eval/unsafe_store2.wast.out b/test/ctor-eval/unsafe_store2.wast.out
index e51bd298d..4427f36e0 100644
--- a/test/ctor-eval/unsafe_store2.wast.out
+++ b/test/ctor-eval/unsafe_store2.wast.out
@@ -1,4 +1,2 @@
(module
- (export "test2" (func $test2))
- (export "test3" (func $test3))
)
diff --git a/test/ctor-eval/unsafe_store3.wast b/test/ctor-eval/unsafe_store3.wast
index 701e4b32e..b8e7c662a 100644
--- a/test/ctor-eval/unsafe_store3.wast
+++ b/test/ctor-eval/unsafe_store3.wast
@@ -2,8 +2,6 @@
(memory 256 256)
(data (i32.const 10) "waka waka waka waka waka")
(export "test1" $test1)
- (export "test2" $test2)
- (export "test3" $test3)
(func $test1
(i32.store16 (i32.const 33) (i32.const 109)) ;; after last segment due to size of type
)
diff --git a/test/ctor-eval/unsafe_store3.wast.out b/test/ctor-eval/unsafe_store3.wast.out
index e51bd298d..4427f36e0 100644
--- a/test/ctor-eval/unsafe_store3.wast.out
+++ b/test/ctor-eval/unsafe_store3.wast.out
@@ -1,4 +1,2 @@
(module
- (export "test2" (func $test2))
- (export "test3" (func $test3))
)