File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed
tests/regression/ba-issues Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ ;; 定义数组类型 - i32数组
2
+ (type $i32_array (array (mut i32 )))
3
+
4
+ ;; main函数
5
+ (func $main
6
+ (local $arr (ref $i32_array ))
7
+
8
+ ;; 创建一个大小为10的i32数组,初始值为0
9
+ (array.new $i32_array
10
+ (i32.const 0 ) ;; 初始值
11
+ (i32.const 10 )) ;; 数组大小
12
+ (local.set $arr )
13
+
14
+ ;; 使用 array.fill 填充数组
15
+ (array.fill $i32_array
16
+ (local.get $arr ) ;; 数组引用
17
+ (i32.const 0 ) ;; 起始索引
18
+ (i32.const 42 ) ;; 填充值
19
+ (i32.const 10 )) ;; 填充长度 - 填满整个数组
20
+ )
21
+
22
+ (memory 1 )
23
+ (export " memory" (memory 0 ))
24
+ (export " _start" (func $main ))
Original file line number Diff line number Diff line change 1754
1754
"stdout content" : " " ,
1755
1755
"description" : " no sanitizer 'heap-buffer-overflow'"
1756
1756
}
1757
+ },
1758
+ {
1759
+ "deprecated" : false ,
1760
+ "ids" : [
1761
+ 4644
1762
+ ],
1763
+ "runtime" : " iwasm-default-gc-enabled" ,
1764
+ "file" : " test.wasm" ,
1765
+ "mode" : " classic-interp" ,
1766
+ "options" : " -f _start" ,
1767
+ "argument" : " " ,
1768
+ "expected return" : {
1769
+ "ret code" : 0 ,
1770
+ "stdout content" : " " ,
1771
+ "description" : " no out of bound exception"
1772
+ }
1757
1773
}
1758
1774
]
1759
1775
}
You can’t perform that action at this time.
0 commit comments