Skip to content

wasm-ld exception #135915

@spequ

Description

@spequ

Trying to build our emscripten project with 4.0.6 version, during linking phase this happens:

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Exception Code: 0xC0000005
Exception Code: 0xC0000005
Exception Code: 0xC0000005
Exception Code: 0xC0000005
#0 0x00007ff7820ddd01 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x4bdd01)
#1 0x00007ff7820e4ecc (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x4c4ecc)
#2 0x00007ff78292c1e3 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0xd0c1e3)
#3 0x00007ff781e80cfd  #0( 0x00007ff7820ddd01 C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260cfd)
#4( 0x00007ff781e80bec (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260bec)
#5C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe 0x00007ff781e80a54 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260a54)
#6 0x00007ff781e80ae8 (+C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260ae8)
#70x4bdd01) 0x00007ff784523633 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x2903633)
#8
0x00007ffd53ed7374#1  0x00007ff7820e4ecc ((C:\Windows\System32\KERNEL32.DLLC:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe++0x4c4ecc0x17374))
#9#2  0x00007ffd54cdcc910x00007ff78292c1e3  ((C:\Windows\SYSTEM32\ntdll.dllC:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe++0xd0c1e30x4cc91))
#3 0x00007ff781e80cfd (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260cfd)
#4 0x00007ff781e80bec (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260bec)
#5 0x00007ff781e80a54 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260a54)
#6 0x00007ff781e80ae8 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260ae8)
#7 0x00007ff784523633 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x2903633)
#8 0x00007ffd53ed7374 (C:\Windows\System32\KERNEL32.DLL+0x17374)
#9 0x00007ffd54cdcc91 (C:\Windows\SYSTEM32\ntdll.dll+0x4cc91)

With all versions from 4.0.6 - 4.0.2 we get different crash backtrace.
With 4.0.1 (and older) we get multiple errors like this:

wasm-ld: error: symbol type mismatch: void xx::someFunction<char [47]>(char const (&) [47])
>>> defined as WASM_SYMBOL_TYPE_SECTION in libx.a(xx.cpp.o)
>>> defined as WASM_SYMBOL_TYPE_FUNCTION in liby.so

which is probably related to this: emscripten-core/emscripten#23501 as I think it was fixed in 4.0.2. I haven't yet tried with 3.1.64 where that regression apparently first occurred or 3.1.63 but everything worked nicely at least with 3.1.54 (yeah, very old, I know).

@sbc100 sorry to ping you directly but I think you might be interested of this...

Activity

llvmbot

llvmbot commented on Apr 16, 2025

@llvmbot
Member

@llvm/issue-subscribers-backend-webassembly

Author: Mikko Nurmi (spequ)

Trying to build our emscripten project with 4.0.6 version, during linking phase this happens:
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Exception Code: 0xC0000005
Exception Code: 0xC0000005
Exception Code: 0xC0000005
Exception Code: 0xC0000005
#<!-- -->0 0x00007ff7820ddd01 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x4bdd01)
#<!-- -->1 0x00007ff7820e4ecc (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x4c4ecc)
#<!-- -->2 0x00007ff78292c1e3 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0xd0c1e3)
#<!-- -->3 0x00007ff781e80cfd  #<!-- -->0( 0x00007ff7820ddd01 C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260cfd)
#<!-- -->4( 0x00007ff781e80bec (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260bec)
#<!-- -->5C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe 0x00007ff781e80a54 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260a54)
#<!-- -->6 0x00007ff781e80ae8 (+C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260ae8)
#<!-- -->70x4bdd01) 0x00007ff784523633 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x2903633)
#<!-- -->8
0x00007ffd53ed7374#<!-- -->1  0x00007ff7820e4ecc ((C:\Windows\System32\KERNEL32.DLLC:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe++0x4c4ecc0x17374))
#<!-- -->9#<!-- -->2  0x00007ffd54cdcc910x00007ff78292c1e3  ((C:\Windows\SYSTEM32\ntdll.dllC:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe++0xd0c1e30x4cc91))
#<!-- -->3 0x00007ff781e80cfd (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260cfd)
#<!-- -->4 0x00007ff781e80bec (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260bec)
#<!-- -->5 0x00007ff781e80a54 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260a54)
#<!-- -->6 0x00007ff781e80ae8 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260ae8)
#<!-- -->7 0x00007ff784523633 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x2903633)
#<!-- -->8 0x00007ffd53ed7374 (C:\Windows\System32\KERNEL32.DLL+0x17374)
#<!-- -->9 0x00007ffd54cdcc91 (C:\Windows\SYSTEM32\ntdll.dll+0x4cc91)

With all versions from 4.0.6 - 4.0.2 we get different crash backtrace.
With 4.0.1 (and older) we get multiple errors like this:

wasm-ld: error: symbol type mismatch: void xx::someFunction&lt;char [47]&gt;(char const (&amp;) [47])
&gt;&gt;&gt; defined as WASM_SYMBOL_TYPE_SECTION in libx.a(xx.cpp.o)
&gt;&gt;&gt; defined as WASM_SYMBOL_TYPE_FUNCTION in liby.so

which is probably related to this: emscripten-core/emscripten#23501 as I think it was fixed in 4.0.2. I haven't yet tried with 3.1.64 where that regression apparently first occurred or 3.1.63 but everything worked nicely at least with 3.1.54 (yeah, very old, I know).

@sbc100 sorry to ping you directly but I think you might be interested of this...

llvmbot

llvmbot commented on Apr 16, 2025

@llvmbot
Member

@llvm/issue-subscribers-lld-wasm

Author: Mikko Nurmi (spequ)

Trying to build our emscripten project with 4.0.6 version, during linking phase this happens:
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Exception Code: 0xC0000005
Exception Code: 0xC0000005
Exception Code: 0xC0000005
Exception Code: 0xC0000005
#<!-- -->0 0x00007ff7820ddd01 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x4bdd01)
#<!-- -->1 0x00007ff7820e4ecc (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x4c4ecc)
#<!-- -->2 0x00007ff78292c1e3 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0xd0c1e3)
#<!-- -->3 0x00007ff781e80cfd  #<!-- -->0( 0x00007ff7820ddd01 C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260cfd)
#<!-- -->4( 0x00007ff781e80bec (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260bec)
#<!-- -->5C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe 0x00007ff781e80a54 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260a54)
#<!-- -->6 0x00007ff781e80ae8 (+C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260ae8)
#<!-- -->70x4bdd01) 0x00007ff784523633 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x2903633)
#<!-- -->8
0x00007ffd53ed7374#<!-- -->1  0x00007ff7820e4ecc ((C:\Windows\System32\KERNEL32.DLLC:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe++0x4c4ecc0x17374))
#<!-- -->9#<!-- -->2  0x00007ffd54cdcc910x00007ff78292c1e3  ((C:\Windows\SYSTEM32\ntdll.dllC:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe++0xd0c1e30x4cc91))
#<!-- -->3 0x00007ff781e80cfd (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260cfd)
#<!-- -->4 0x00007ff781e80bec (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260bec)
#<!-- -->5 0x00007ff781e80a54 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260a54)
#<!-- -->6 0x00007ff781e80ae8 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x260ae8)
#<!-- -->7 0x00007ff784523633 (C:\work\git\emsdk_windows\upstream\bin\wasm-ld.exe+0x2903633)
#<!-- -->8 0x00007ffd53ed7374 (C:\Windows\System32\KERNEL32.DLL+0x17374)
#<!-- -->9 0x00007ffd54cdcc91 (C:\Windows\SYSTEM32\ntdll.dll+0x4cc91)

With all versions from 4.0.6 - 4.0.2 we get different crash backtrace.
With 4.0.1 (and older) we get multiple errors like this:

wasm-ld: error: symbol type mismatch: void xx::someFunction&lt;char [47]&gt;(char const (&amp;) [47])
&gt;&gt;&gt; defined as WASM_SYMBOL_TYPE_SECTION in libx.a(xx.cpp.o)
&gt;&gt;&gt; defined as WASM_SYMBOL_TYPE_FUNCTION in liby.so

which is probably related to this: emscripten-core/emscripten#23501 as I think it was fixed in 4.0.2. I haven't yet tried with 3.1.64 where that regression apparently first occurred or 3.1.63 but everything worked nicely at least with 3.1.54 (yeah, very old, I know).

@sbc100 sorry to ping you directly but I think you might be interested of this...

added
crashPrefer [crash-on-valid] or [crash-on-invalid]
and removed on Apr 16, 2025
added
incompleteIssue not complete (e.g. missing a reproducer, build arguments, etc.)
on Apr 16, 2025
EugeneZelenko

EugeneZelenko commented on Apr 16, 2025

@EugeneZelenko
Contributor

Could you please provide reproducer?

spequ

spequ commented on Apr 17, 2025

@spequ
Author

Could you please provide reproducer?

I'll try to find some time, probably won't happen before next week due to public holidays. I'll try to recreate the issue in a sandbox as our current project is rather huge...

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashPrefer [crash-on-valid] or [crash-on-invalid]incompleteIssue not complete (e.g. missing a reproducer, build arguments, etc.)lld:wasm

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @EugeneZelenko@dtcxzyw@spequ@llvmbot

        Issue actions

          wasm-ld exception · Issue #135915 · llvm/llvm-project