binaryen icon indicating copy to clipboard operation
binaryen copied to clipboard

wasm-opt segmentation fault with, but not with --debug

Open mkarup opened this issue 9 months ago • 1 comments

I have a binary wasm file demo1 (zipped here). If I use the binary of binaryen/ wasm-opt available on the releases page, version 117, and I call

wasm-opt -O2 --enable-tail-call --enable-reference-types --enable-gc --enable-mutable-globals -o demo1-opt_O2.wasm demo1

I get a segfault:

Segmentation fault (core dumped)

The same happens for -O3, but not with O1. If I add the --debug flag to the when doing -O2 or -O3, the command succeeds and optimizes the binary.

If I build binaryen/ wasm-opt from source, I don't get any segmentation faults.

mkarup avatar May 20 '24 06:05 mkarup