Most likely due to #8862.
Source file:
# a.cpp
#include <sstream>
int main() {
std::ostringstream s;
return 0;
}
Shell commands:
$ em++ -g -fwasm-exceptions a.cpp
$ ~/cpython/emsdk-cache/6.0.2/emsdk/upstream/bin/wasm-opt -g a.out.wasm -o res.wasm
warning: no passes specified, not doing any work
wasm-opt: /b/s/w/ir/cache/builder/emscripten-releases/binaryen/src/wasm/wasm-debug.cpp:439: void wasm::Debug::AddrExprMap::add(Expression *, const BinaryLocations::Span): Assertion `!endMap.contains(span.end)' failed.
Aborted (core dumped)
Or:
$ em++ -g -O2 -fwasm-exceptions a.cpp
em++: warning: running limited binaryen optimizations because DWARF info requested (or indirectly required) [-Wlimited-postlink-optimizations]
wasm-opt: /b/s/w/ir/cache/builder/emscripten-releases/binaryen/src/wasm/wasm-debug.cpp:439: void wasm::Debug::AddrExprMap::add(Expression *, const BinaryLocations::Span): Assertion `!endMap.contains(span.end)' failed.
em++: error: '/home/hood/cpython/emsdk-cache/6.0.2/emsdk/upstream/bin/wasm-opt --strip-target-features --post-emscripten -O2 --low-memory-unused --zero-filled-memory --pass-arg=directize-initial-contents-immutable t.wasm -o t.wasm -g --mvp-features --enable-bulk-memory --enable-bulk-memory-opt --enable-call-indirect-overlong --enable-exception-handling --enable-multivalue --enable-mutable-globals --enable-nontrapping-float-to-int --enable-reference-types --enable-sign-ext' failed (received SIGABRT (-6))
Most likely due to #8862.
Source file:
Shell commands:
Or: