summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/Oz_fuzz-exec_all-features.txt16
-rw-r--r--test/passes/Oz_fuzz-exec_all-features.wast13
2 files changed, 29 insertions, 0 deletions
diff --git a/test/passes/Oz_fuzz-exec_all-features.txt b/test/passes/Oz_fuzz-exec_all-features.txt
index 4ac373f75..1360d6b42 100644
--- a/test/passes/Oz_fuzz-exec_all-features.txt
+++ b/test/passes/Oz_fuzz-exec_all-features.txt
@@ -65,6 +65,8 @@
[LoggingExternalInterface logging 2]
[LoggingExternalInterface logging 42]
[LoggingExternalInterface logging 50]
+[fuzz-exec] calling array.init-packed
+[LoggingExternalInterface logging 8]
(module
(type $extendedstruct (struct (field (mut i32)) (field f64)))
(type $struct (struct (field (mut i32))))
@@ -95,6 +97,7 @@
(export "array-copy" (func $20))
(export "rtt_Fresh" (func $21))
(export "array.init" (func $22))
+ (export "array.init-packed" (func $23))
(func $0 (; has Stack IR ;)
(local $0 i32)
(call $log
@@ -487,6 +490,17 @@
)
)
)
+ (func $23 (; has Stack IR ;)
+ (call $log
+ (array.get_u $bytes
+ (array.init $bytes
+ (i32.const -11512)
+ (rtt.canon $bytes)
+ )
+ (i32.const 0)
+ )
+ )
+ )
)
[fuzz-exec] calling structs
[LoggingExternalInterface logging 0]
@@ -554,6 +568,8 @@
[LoggingExternalInterface logging 2]
[LoggingExternalInterface logging 42]
[LoggingExternalInterface logging 50]
+[fuzz-exec] calling array.init-packed
+[LoggingExternalInterface logging 8]
ignoring comparison of ExecutionResults!
[fuzz-exec] calling foo
[host limit allocation failure]
diff --git a/test/passes/Oz_fuzz-exec_all-features.wast b/test/passes/Oz_fuzz-exec_all-features.wast
index a41e2bf70..54d93c9d0 100644
--- a/test/passes/Oz_fuzz-exec_all-features.wast
+++ b/test/passes/Oz_fuzz-exec_all-features.wast
@@ -497,6 +497,19 @@
(array.get_u $bytes (local.get $x) (i32.const 1))
)
)
+ (func "array.init-packed"
+ (local $x (ref null $bytes))
+ (local.set $x
+ (array.init $bytes
+ (i32.const -11512)
+ (rtt.canon $bytes)
+ )
+ )
+ ;; The value should be be -11512 & 255 => 8
+ (call $log
+ (array.get_u $bytes (local.get $x) (i32.const 0))
+ )
+ )
)
(module
(type $[mut:i8] (array (mut i8)))