Stream: git-wasmtime

Topic: wasmtime / issue #11520 Unlike the exit code of other run...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 24 2025 at 10:48):

gaaraw opened issue #11520:

Phenomenon description

Hello, when I use multiple runtime tools in the terminal, I notice different behavior for the same wasm program. The specific performance is as follows:

wasmtime:
Output:

Error: failed to run main module `work.wasm`

Caused by:
    0: failed to invoke command default
    1: error while executing at wasm backtrace:
           0:     0xd8 - <unknown>!<wasm function 4>
           1:     0xb6 - <unknown>!<wasm function 3>
    2: Pointer not aligned to 4: Region { start: 1, len: 4 }

exit code: 1

wasmer / wasmedge / wamr:
No output
exit code: 0

Test Case

test_case.zip

Steps to Reproduce

# run wasm file
/path/to/wasmtime test_case.wasm
/path/to/wasmer run test_case.wasm
/path/to/wasmedge --enable-jit test_case.wasm
/path/to/iwasm test_case.wasm

Versions and Environment

The runtime tools are all built on release and use JIT mode.

Extra Info

If you need any other relevant information, please let me know and I will do my best to provide it. Looking forward to your reply! Thank you!

view this post on Zulip Wasmtime GitHub notifications bot (Aug 24 2025 at 10:50):

bjorn3 commented on issue #11520:

Wasmer, wasmedge and wamr are probably just more lenient around unaligned pointers. Wasmtime does check that pointers passed to wasi that should be aligned are actually aligned.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 24 2025 at 11:08):

gaaraw commented on issue #11520:

So the reason is that other runtime tools don't strictly do alignment checks. Is this kind of leniency of them allowed?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 24 2025 at 11:11):

bjorn3 commented on issue #11520:

wasip1 doesn't have a good specification, so whether or not it is allowed to not check for alignment is kind of undefined I think.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 25 2025 at 14:22):

alexcrichton closed issue #11520:

Phenomenon description

Hello, when I use multiple runtime tools in the terminal, I notice different behavior for the same wasm program. The specific performance is as follows:

wasmtime:
Output:

Error: failed to run main module `work.wasm`

Caused by:
    0: failed to invoke command default
    1: error while executing at wasm backtrace:
           0:     0xd8 - <unknown>!<wasm function 4>
           1:     0xb6 - <unknown>!<wasm function 3>
    2: Pointer not aligned to 4: Region { start: 1, len: 4 }

exit code: 1

wasmer / wasmedge / wamr:
No output
exit code: 0

Test Case

test_case.zip

Steps to Reproduce

# run wasm file
/path/to/wasmtime test_case.wasm
/path/to/wasmer run test_case.wasm
/path/to/wasmedge --enable-jit test_case.wasm
/path/to/iwasm test_case.wasm

Versions and Environment

The runtime tools are all built on release and use JIT mode.

Extra Info

If you need any other relevant information, please let me know and I will do my best to provide it. Looking forward to your reply! Thank you!

view this post on Zulip Wasmtime GitHub notifications bot (Aug 25 2025 at 14:22):

alexcrichton commented on issue #11520:

Yes as @bjorn3 mentioned this is expected behavior. If you're fuzzing WASIp1 we recommend not doing so


Last updated: Dec 06 2025 at 07:03 UTC