Hi. Probably after migration to 2.3.20, the binary...
# webassembly
r
Hi. Probably after migration to 2.3.20, the binaryen executable crashes with SEGV when building some of my larger wasmJs applications. Anyone has similar experience?
When debugging binaryen execution I see it crashes on
running pass: merge-similar-functions...
The non-optimized, development version of the wasmJs application seems to run without problems.
Is this Binaryen issue, Kotlin issue or something else?
I've managed to workaround the problem by changing the last binaryen parameter used by KGP from
-Oz
to
-Os
("super-focusing on code size" -> "focusing on code size").
🎉 1
b
Is this Binaryen issue, Kotlin issue or something else?
Sounds like an issue in binaryen. Could you please file an issue at https://github.com/WebAssembly/binaryen/issues/ and share a link in this thread?
I was asked for some testing and it seems setting
BINARYEN_CORES=1
fixes the problem.
I don't really have experience debugging native code, so I don't know if I can do anything else.
The issue was fixed by the binaryen team.
b
Great to see it’s fixed, thanks for the efforts!
r
Binaryen 130 has been released with a fix for this issue. It would be great if it could be upgraded in KGP before 2.4.0 final is released. @bashor
b
Unfortunately, it's too late for 2.4.0
😭 1
We'll look into it and share a workaround working for 2.4.0 in the issue ASAP
thank you color 1
r
when is 2.4.0 final planned?
b
this week
r
cool!
b
I think the easiest and proper workaround is setting binaryen version to 130 on a project side