Skip to content

wasm-opt segfault on merge-similar-functions with Kotlin generated wasm code #8594

Description

@rjaros

Hi,

I'm using Kotlin compiler to build wasm application. Kotlin plugin is using wasm-opt to optimize wasm code. My application causes wasm-opt to crash. The wasm-opt binary is called with these parameters:

--enable-gc --enable-reference-types --enable-exception-handling --enable-bulk-memory --enable-nontrapping-float-to-int --closed-world --no-inline=kotlin.wasm.internal.throwValue --no-inline=kotlin.wasm.internal.getKotlinException --inline-functions-with-loops --traps-never-happen --fast-math --type-ssa -O3 -O3 --gufa -O3 --type-merging -O3 -Oz

The wasm code:
app.zip

When using debug option I can see it crashes when running merge-similar-functions pass.

The workaround is to replace the last parameter -Oz with -Os.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions