Skip to content

Commit

Permalink
add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed May 9, 2023
1 parent 189dee5 commit 54df758
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions wat/wasi/unaligned.wat
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
;; unaligned wasi structures should cause a trap.
;; cf. https://github.com/WebAssembly/WASI/pull/523
;;
;; toywasm trap
;; wasm3 no trap
;; wamr no trap
;; wasmtime trap
;; wasmer no trap
;; wazero no trap
;; wasmi_cli trap

;; % toywasm --wasi unaligned.wasm
;; Error: [trap] unknown (18): unaligned access to address 2 in a host call (expected alignment 4)
;; 2023-05-09 23:57:25 (1683644245.034127000): instance_execute_func failed with -1
;; 2023-05-09 23:57:25 (1683644245.034808000): invoke failed with -1
;; %

(module
(func $fd_write (import "wasi_snapshot_preview1" "fd_write") (param i32 i32 i32 i32) (result i32))
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
Expand Down

0 comments on commit 54df758

Please sign in to comment.