<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/69335>69335</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Wasm-ld crash
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          harutyuntagushyan8
      </td>
    </tr>
</table>

<pre>
    I'm building project with emscripten(3.1.47) in which clang version is 18.0.0.
In linking state I got crash with this stacktrace`

Stack dump:
0.      Program arguments: /Users/htagushyan/repos/pi-libs/javascript/emsdk/upstream/bin/wasm-ld @/var/folders/7g/wm08bcvs20lbf6y0lzp_zm840000gn/T/emscripten_e0r14oju.rsp.utf-8
 #0 0x000000010909cfc8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/Users/htagushyan/repos/pi-libs/javascript/emsdk/upstream/bin/lld+0x100145fc8)
 #1 0x000000010909a9d5 llvm::sys::RunSignalHandlers() (/Users/htagushyan/repos/pi-libs/javascript/emsdk/upstream/bin/lld+0x1001439d5)
 #2 0x000000010909dbd6 SignalHandler(int) (/Users/htagushyan/repos/pi-libs/javascript/emsdk/upstream/bin/lld+0x100146bd6)
 #3 0x00007ff81327637d (/usr/lib/system/libsystem_platform.dylib+0x7ff80046637d)
 #4 0x00000001094a68dd bool llvm::DenseMapBase<llvm::DenseMap<lld::wasm::ImportKey<llvm::wasm::WasmSignature>, unsigned int, llvm::DenseMapInfo<lld::wasm::ImportKey<llvm::wasm::WasmSignature>, void>, llvm::detail::DenseMapPair<lld::wasm::ImportKey<llvm::wasm::WasmSignature>, unsigned int>>, lld::wasm::ImportKey<llvm::wasm::WasmSignature>, unsigned int, llvm::DenseMapInfo<lld::wasm::ImportKey<llvm::wasm::WasmSignature>, void>, llvm::detail::DenseMapPair<lld::wasm::ImportKey<llvm::wasm::WasmSignature>, unsigned int>>::LookupBucketFor<lld::wasm::ImportKey<llvm::wasm::WasmSignature>>(lld::wasm::ImportKey<llvm::wasm::WasmSignature> const&, llvm::detail::DenseMapPair<lld::wasm::ImportKey<llvm::wasm::WasmSignature>, unsigned int> const*&) const (/Users/htagushyan/repos/pi-libs/javascript/emsdk/upstream/bin/lld+0x10054f8dd)
 #5 0x00000001094ac861 lld::wasm::writeResult() (/Users/htagushyan/repos/pi-libs/javascript/emsdk/upstream/bin/lld+0x100555861)
 #6 0x000000010946ed27 lld::wasm::(anonymous namespace)::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/Users/htagushyan/repos/pi-libs/javascript/emsdk/upstream/bin/lld+0x100517d27)
 #7 0x000000010946abad lld::wasm::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/Users/htagushyan/repos/pi-libs/javascript/emsdk/upstream/bin/lld+0x100513bad)
 #8 0x00000001090b0553 lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) (/Users/htagushyan/repos/pi-libs/javascript/emsdk/upstream/bin/lld+0x100159553)
 #9 0x0000000108fe7c62 lld_main(int, char**, llvm::ToolContext const&) (/Users/htagushyan/repos/pi-libs/javascript/emsdk/upstream/bin/lld+0x100090c62)
#10 0x0000000108fe8361 main (/Users/htagushyan/repos/pi-libs/javascript/emsdk/upstream/bin/lld+0x100091361)
#11 0x00007ff812ec03a6
em++: error: '/Users/htagushyan/repos/pi-libs/javascript/emsdk/upstream/bin/wasm-ld @/var/folders/7g/wm08bcvs20lbf6y0lzp_zm840000gn/T/emscripten_e0r14oju.rsp.utf-8' failed (received SIGSEGV (-11))
ninja: build stopped: subcommand failed.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsV11v4ygX_jXkBjXCYGN8kYv0w_NW74w0ms7uXFbYYJsWgwU4bebXr7AzTdypVvvRdrXSVlVC-DjneR4OBw73XrVGyg3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