#5644·wasmer

There is a lack of out-of-bounds warnings or error messages when executing an out-of-bounds program

Author: gaarawCreated Jul 17, 2025Updated Aug 28, 2026
Labels🏚 stale

Describe the bug

Hello, when I execute a wasm program using wasmer's default mode (Cranelift + JIT), there is a situation where the execution time is significantly longer than that of other runtime tools, which catches my attention. I get the same result when I choose to use the llvm backend. The specific performance is as follows:

  • wasmer + Cranelift: 0.727107
  • wasmer + llvm: 0.710659
  • wasmtime: 0.004785
  • wamr_fast_jit: 0.007904
  • wamr_llvm_jit: 0.026828
  • wamr_multi-tier_jit: 0.026118

Data is measured in seconds, and each data is the result of ten executions and averages.

Environment

  • wasmer:wasmer 6.0.1
  • wasmtime:wasmtime 35.0.0 (9c2e6f17c 2025-06-17)
  • WAMR:iwasm 2.3.1
  • llvm:18.1.8
  • Host OS:Ubuntu 22.04.5 LTS 64位
  • CPU:12th Gen Intel® Core™ i7-12700 × 20
  • rustc:rustc 1.87.0 (17067e9ac 2025-05-09) binary: rustc commit-hash: 17067e9ac6d7ecb70e50f92c1944e545188d2359 commit-date: 2025-05-09 host: x86_64-unknown-linux-gnu release: 1.87.0 LLVM version: 20.1.1

Both wasmer and wasmtime are default release builds.

Steps to reproduce

test_case.zip

# Execute the wasm file and collect data
# (repeat the command if the standard deviation is large)
perf stat -r 10 -e 'task-clock' /path/to/wasmer run test_case.wasm
perf stat -r 10 -e 'task-clock' /path/to/wasmer run test_case.wasm --llvm
perf stat -r 10 -e 'task-clock' /path/to/wasmtime test_case.wasm
perf stat -r 10 -e 'task-clock' /path/to/build_fast_jit/iwasm test_case.wasm
perf stat -r 10 -e 'task-clock' /path/to/build_llvm_jit/iwasm test_case.wasm
perf stat -r 10 -e 'task-clock' /path/to/build_mul_jit/iwasm test_case.wasm

Expected and actual behavior

The execution time of wasmer is 152x, 92x, 27x, and 28x, respectively, for the other four runtimes, which is obviously out of the normal fluctuation range.

Additional context

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