Skip to content

[WebAssembly] wasm-ld assertion failure on isa<UndefinedData>(sym) #94077

Closed
@kripken

Description

@kripken
wasm-ld: /b/s/w/ir/cache/builder/emscripten-releases/llvm-project/lld/wasm/SyntheticSections.cpp:522: virtual void lld::wasm::GlobalSection::writeBody(): Assertion `isa<UndefinedData>(sym)' failed.

More context and details here, including steps to reproduce:

emscripten-core/emscripten#22008 (comment)

As mentioned there this is a regression, and bisection leads to it likely caused by one of these:

   2024-01-20 sbc@chromium.org [lld][WebAssembly] Fix regression in function signature checking (#78831)
    2024-01-20 sbc@chromium.org [lld][WebAssembly] Match the ELF linker in transitioning away from archive indexes. (#78658)
    2024-01-19 sbc@chromium.org [lld][WebAssembly] Use the archive offset with --whole-archive (#78791)
    2024-01-19 sbc@chromium.org [lld][WebAssembly] Reset context object after each link (#78770)
    2024-01-19 sbc@chromium.org [lld][ELF] Simplify handleLibcall. NFC (#78659)

I'll also email @sbc100 with the output of -Wl,--reproduce as requested (too big to attach here).

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashPrefer [crash-on-valid] or [crash-on-invalid]lld:wasm

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions