Hello there, the following code snippet is the sample webassembly module (in textual format) I extracted from [here](https://github.com/WebAssembly/spec/blob/main/test/core/bulk.wast#L154):

```wasm
(module
  (type (;0;) (func))
  (type (;1;) (func (param i32)))
  (func (;0;) (type 0)
    data.drop 0)
  (func (;1;) (type 1) (param i32)
    i32.const 0
    i32.const 0
    local.get 0
    memory.init 0)
  (func (;2;) (type 0)
    data.drop 1)
  (func (;3;) (type 1) (param i32)
    i32.const 0
    i32.const 0
    local.get 0
    memory.init 1)
  (func (;4;) (type 0)
    i32.const 1
    call 1
    call 0
    call 0
    i32.const 0
    call 1
    i32.const 0
    call 1
    call 2
    i32.const 0
    call 3
    i32.const 0
    call 3)
  (memory (;0;) 1)
  (export "drop_passive" (func 0))
  (export "init_passive" (func 1))
  (export "drop_active" (func 2))
  (export "init_active" (func 3))
  (export "_start" (func 4))
  (start 4)
  (data (;0;) "x")
  (data (;1;) (i32.const 0) "x"))
```

Since it comes from offical test suite, I assume it's semantically correct, however when running this wasm module with `wasm-interp`, it gives following error:
```sh
$ ~/wabt/bin/wasm-interp test.wasm -r "_start"
_start() => error: out of bounds memory access: memory.init out of bounds
```
Does anybody know why `wasm-interp` gives OOB error on this module? The `wabt` version I'm currently using is 9008bc808. (The newest commit version dddc03d3bc has the same error)
wasm-interp errors on seemingly semantically-correct wasm module
This is a GitHub Issue
repo:wabt
owner:WebAssembly
Title : wasm-interp errors on seemingly semantically-correct wasm module
Issue date:

--- start body ---
Hello there, the following code snippet is the sample webassembly module (in textual format) I extracted from [here](https://github.com/WebAssembly/spec/blob/main/test/core/bulk.wast#L154):

```wasm
(module
  (type (;0;) (func))
  (type (;1;) (func (param i32)))
  (func (;0;) (type 0)
    data.drop 0)
  (func (;1;) (type 1) (param i32)
    i32.const 0
    i32.const 0
    local.get 0
    memory.init 0)
  (func (;2;) (type 0)
    data.drop 1)
  (func (;3;) (type 1) (param i32)
    i32.const 0
    i32.const 0
    local.get 0
    memory.init 1)
  (func (;4;) (type 0)
    i32.const 1
    call 1
    call 0
    call 0
    i32.const 0
    call 1
    i32.const 0
    call 1
    call 2
    i32.const 0
    call 3
    i32.const 0
    call 3)
  (memory (;0;) 1)
  (export "drop_passive" (func 0))
  (export "init_passive" (func 1))
  (export "drop_active" (func 2))
  (export "init_active" (func 3))
  (export "_start" (func 4))
  (start 4)
  (data (;0;) "x")
  (data (;1;) (i32.const 0) "x"))
```

Since it comes from offical test suite, I assume it's semantically correct, however when running this wasm module with `wasm-interp`, it gives following error:
```sh
$ ~/wabt/bin/wasm-interp test.wasm -r "_start"
_start() => error: out of bounds memory access: memory.init out of bounds
```
Does anybody know why `wasm-interp` gives OOB error on this module? The `wabt` version I'm currently using is 9008bc808. (The newest commit version dddc03d3bc has the same error)
--- end body ---

The issue reported indicates that the WebAssembly module is causing an out-of-bounds memory access error when executed with `wasm-interp`. This suggests a potential vulnerability in the memory management of the WebAssembly interpreter, as it fails to handle certain valid operations correctly, leading to crashes or undefined behavior. This could be exploited if an attacker can control the input to the module, potentially leading to a Denial of Service (DoS) or other unintended consequences.