Skip to content

Produces code that fails wasm-opt #258

@jpochyla

Description

@jpochyla

Describe the Bug

When the wasm-opt == 116, with -O3 -g flags, is run on Rust crate compiled with the following wasm-bindgen-cli-support == 0.2.89 setup:

Bindgen::new()
            .input_path(...)
            .out_name(...)
            .debug(false)
            .keep_debug(true)
            .web(true)?
            .weak_refs(true)
            .generate(...)?;

...it crashes with the following error:

$ wasm-opt-e61e7b9e41e11ab4/wasm-opt foo.wasm -o foo.wasm -O3 -g
compile unit size was incorrect (this may be an unsupported version of DWARF)
UNREACHABLE executed at /Users/runner/work/binaryen/binaryen/third_party/llvm-project/DWARFEmitter.cpp:201!

I think it's likely that the latest DWARF changes broke this, as it used to work before (or at least result in a working binary.)

Is there anything I can do to help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions