Skip to content

[wasm-split] Not splitting correctly after wasm-opt #7725

@biggs0125

Description

@biggs0125

I'm trying to use wasm-split after having run wasm-opt on a module. The tool runs to completion and creates the modules as requested. However, when I try to load the modules I get an error:
Uncaught RuntimeError: null function or function signature mismatch

This comes from a call_indirect instruction:
call_indirect (param (ref $type337)) (result (ref $type144)) $.H

Pausing at that instruction and checking the $.H table, I see that table is empty. I believe this is a table generated by wasm-split.

If I do the same splits but without running wasm-opt on my module, everything loads as expected.

Metadata

Metadata

Assignees

No one assigned

    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