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

Open
#4,281 5 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@vishal2005025 is already working on this.

Since Dec 26, 2025.

  • #4884 by @omda777 — closed without merging

Assessment

This issue has not been assessed yet.

Description

bug
Summary

The same wasm program throws a difference in behavior between different runtime tools: whether to output out of bounds exceptions.

Current State

Wasmedge does not produce any output, wasmtime and WAMR output out of bounds exceptions. The execution is shown in the screenshot.

Expected State

Wasmedge outputs out of bounds exception.

Reproduction steps

test_case_new.zip

Description of the program that caused the exception: The source is from LLVM Test Suite, and the original file mandel-text.wasm is executed normally. After I made one change to mandel-text.wat file, the results made a difference. The change process is as follows:

# mandel-text.wat, line 450
(local.get 4)

replaced with

# test_case_new.wat, line 450-452
(i32.add
    (local.get 3)
    (i32.const 16))

Overall process:

emcc mandel-text.cpp -o mandel-text.wasm -O2 -s WASM=1
wasm2wat -f mandel-text.wasm -o mandel-text.wat
# Replace
wat2wasm test_case_new.wat -o test_case_new.wasm
# Just execute

Environment:

  • wasmtime:wasmtime 35.0.0 (9c2e6f17c 2025-06-17)
  • WAMR:iwasm 2.4.0
  • emcc:4.0.10 (b7dc6e5747465580df5984e723b9d1f10d8e804b)
  • wabt:1.0.27
Screenshots
Image
Any logs you want to share for showing the specific issue

No response

Components

CLI

WasmEdge Version or Commit you used

version 0.14.1

Operating system information

Ubuntu 22.04.5 LTS

Hardware Architecture

x86_64

Compiler flags and options
  • g++:11.4.0
  • cmake:3.22.1
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_BUILD_TESTS=ON .. && make -j
Dominant language
C++
Stars
10.8k
Forks
1.2k
Avg merge
2d 23h
Merged PRs (30d)
48

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WasmEdge/WasmEdge

All issues in WasmEdge/WasmEdge

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.