You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This wasm file is to test whether a wasm runtime could deal with the error of index out of bounds errors when import_global_index is greeter than imports.globals length.
The wasm file is : C2-1-wasm.txt
The python file is :
import os
from wasmer import engine, wat2wasm, Store, Module, Instance, wasi
# from wasmer_compiler_cranelift import Compiler
# from wasmer_compiler_llvm import Compiler
from wasmer_compiler_singlepass import Compiler
engine = engine.Universal(Compiler)
# Create a store, that holds the engine.
store = Store(engine)
# Let's compile the Wasm module with the Cranelift compiler.
__dir__ = os.path.dirname(os.path.realpath(__file__))
module = Module(Store(), open(__dir__ + './tmp.wasm', 'rb').read())
instance = Instance(module)
Steps to reproduce
python tmp.py
Expected behavior
Report index out of bounds error.
Actual behavior
The output of wasmer is:
│ 1: module instantiation failed (engine: universal, compiler: cranelift)
╰─▶ 2: Validation error: constant expression required: global.get of locally defined global (at offset 18)
However, wasmer python print nothing.
The text was updated successfully, but these errors were encountered:
Describe the bug
This wasm file is to test whether a wasm runtime could deal with the error of
index out of bounds
errors when import_global_index is greeter than imports.globals length.The wasm file is :
C2-1-wasm.txt
The python file is :
Steps to reproduce
Expected behavior
Report
index out of bounds
error.Actual behavior
The output of wasmer is:
│ 1: module instantiation failed (engine: universal, compiler: cranelift)
╰─▶ 2: Validation error: constant expression required: global.get of locally defined global (at offset 18)
However, wasmer python print nothing.
The text was updated successfully, but these errors were encountered: