Open kripken opened 5 years ago
Oddly I no longer see this on https://github.com/emscripten-core/emscripten/pull/8550 - so something I was doing during the work caused it. I guess that means this isn't urgent (but the testcase is still an actual crash).
Sorry, my mistake - looking closer, I don't see a smaller one.
Yes please upload the smallest test case you have.
I see now I have some smaller testcases showing the same problem - I can submit a smaller one if that would be better.
Extended Description
This crashes:
wasm-ld src_0.o libz.a libc.bc libc-wasm.bc libdlmalloc.bc libpthreads_stub.bc libcompiler_rt.a libcompiler_rt_wasm.a libc_rt_wasm.a -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --export wasm_call_ctors --export data_end --export main --export malloc --export free --export setThrew --export __errno_location --export fflush -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=16777216 --global-base=1024 -o src.c.o.wasm --allow-undefined --import-memory --import-table --lto-O0
and the crash says it is on
lld::wasm::FunctionSymbol::getFunctionIndex()
Valgrind confirms with "Invalid read of size 1" on that function.
Noticed this when working on https://github.com/emscripten-core/emscripten/pull/8550 , that is, when getting emscripten to properly test LTO. The attached files are from running wasmlto0.test_zlib on that PR (specifically 84d61dac52c8a74898bb953916d0f4654348163e).