WebAssembly / wabt

The WebAssembly Binary Toolkit
Apache License 2.0
6.9k stars 702 forks source link

wasm2c compiling minimal example issues #2423

Closed whirlicote closed 6 months ago

whirlicote commented 6 months ago

When I try to compile this module

(module $empty)

with

wasm2wat --version

wat2wasm empty.wat
wasm2c empty.wasm -o empty

I get the following error message:

1.0.35
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string_view::substr: __pos (which is 18446744073709551615) > __size (which is 5)
./do.sh: line 4: 392733 Aborted                 (core dumped) wasm2c empty.wasm -o empty
SoniEx2 commented 6 months ago

it should be -o empty.c, but thanks for the report!