bug: Unexpected behavior
erxiaozhou opened this issue · comments
Summary
When executing a valid test case, WasmEdge raises an exception.
Current State
terminate called after throwing an instance of 'std::invalid_argument'
what(): stoll
Aborted
Expected State
output -1 or 4294967295
Reproduction steps
- Build with command: cmake -DCMAKE_INSTALL_PREFIX="$install_dir" -DCMAKE_PREFIX_PATH="/usr/lib/llvm-12" -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_BUILD_AOT_RUNTIME=OFF ..
- Execute with command: wasmedge run --reactor <test_case> "to_test"
i32.gt_s_54_485_17118920438119833.zip
Screenshots
Any logs you want to share for showing the specific issue
No response
Components
CLI
WasmEdge Version or Commit you used
Operating system information
Ubuntu 20.04
Hardware Architecture
x86_64
Compiler flags and options
cmake -DCMAKE_INSTALL_PREFIX="$install_dir" -DCMAKE_PREFIX_PATH="/usr/lib/llvm-12" -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_BUILD_AOT_RUNTIME=OFF ..
You may use the wrong command.
This WASM exports the "_start" function, so that you can run with the WASI mode with the command:
$ wasmedge run i32.gt_s_54_485_17118920438119833.wasm
4294967295
And this WASM also exports the "to_test" function, which is the same as the "_start" function, so you can also run with the reactor mode:
$ wasmedge run --reactor i32.gt_s_54_485_17118920438119833.wasm to_test
4294967295
Please notice the ordering of options and arguments:
./wasmedge [SUBCOMMANDS] [OPTIONS] [--] WASM_OR_SO [ARG ...]