We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12c4aed commit 14a7d93Copy full SHA for 14a7d93
wat/wasi/efault.wat
@@ -0,0 +1,25 @@
1
+;; wasm3, wasm-micro-runtime: trap "out of bounds memory access" trap
2
+;; wasmer, wasmtime: exit with 21
3
+
4
+(module
5
+ (func $fd_write (import "wasi_snapshot_preview1" "fd_write") (param i32 i32 i32 i32) (result i32))
6
+ (func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
7
+ (func (export "_start")
8
+ ;; iov->iov_base = 0xffffffff
9
+ i32.const 0
10
+ i32.const 0xfffffff0 ;; out of range address
11
+ i32.store
12
+ ;; iov->iov_len = 100
13
+ i32.const 4
14
+ i32.const 100
15
16
17
+ i32.const 1 ;; fd = STDOUT
18
+ i32.const 0 ;; iov_addr
19
+ i32.const 1 ;; iov_count
20
+ i32.const 8 ;; retp
21
+ call $fd_write
22
+ call $proc_exit
23
+ )
24
+ (memory (export "memory") 1)
25
+)
0 commit comments