Closed nidefawl closed 2 months ago
Thanks for the report, I've managed to reproduce it. I'll try to look into it a bit later.
I posted a potential fix for this at https://github.com/llvm/llvm-project/pull/88487.
This issue should have been fixed now, in https://github.com/mstorsjo/llvm-mingw/releases/tag/20240417.
I can confirm this is fixed in the latest release. Thanks a lot!
Here is a working reproducer for a segfault in lld. I tested 17.0.6 and 18.1.2. Both are crashing. I don't know if this has been reported upstream before.
The crash goes away when I remove either line from the CMakeLists.txt
It also does not crash when building in release mode without
-g
... 5 warnings generated. [38/38 100% :: 4.379] Linking CXX executable Debug\test_vst3sdk.exe FAILED: Debug/test_vst3sdk.exe C:\WINDOWS\system32\cmd.exe /C "cd . && C:\dev\bin\llvm-mingw-20240320-ucrt-x86_64\bin\clang++.exe -g -Wl,--gc-sections CMakeFiles/test_vst3sdk.dir/Debug/main.cpp.obj -o Debug\test_vst3sdk.exe -Wl,--out-implib,Debug\libtest_vst3sdk.dll.a -Wl,--major-image-version,0,--minor-image-version,0 lib/Debug/libsdk_hosting.a lib/Debug/libsdk_common.a lib/Debug/libbase.a lib/Debug/libpluginterfaces.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ." PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Exception Code: 0xC0000005
0 0x00007ff7df950145 (C:\dev\bin\llvm-mingw-20240320-ucrt-x86_64\bin\ld.lld.exe+0x2d0145)
1 0x00007ff95a6d3efd std::1::deque<std::1::function<void ()>, std::1::allocator<std::1::function<void ()>>>::__add_back_capacity() (C:\dev\bin\llvm-mingw-20240320-ucrt-x86_64\bin\libLLVM-18.dll+0xd3efd)
2 0x00007ff95a6d3e0c std::1::deque<std::1::function<void ()>, std::1::allocator<std::1::function<void ()>>>::__add_back_capacity() (C:\dev\bin\llvm-mingw-20240320-ucrt-x86_64\bin\libLLVM-18.dll+0xd3e0c)
3 0x00007ff95a6d27f5 std::1::vector<std::1::thread, std::1::allocator<std::1::thread>>::__append(unsigned long long) (C:\dev\bin\llvm-mingw-20240320-ucrt-x86_64\bin\libLLVM-18.dll+0xd27f5)
4 0x00007ff95a6d29b0 std::1::vector<std::1::thread, std::1::allocator<std::1::thread>>::__append(unsigned long long) (C:\dev\bi
ninja: build stopped: subcommand failed. n\llvm-mingw-20240320-ucrt-x86_64\bin\libLLVM-18.dll+0xd29b0)
5 0x00007ff99df81bb2 (C:\WINDOWS\System32\ucrtbase.dll+0x21bb2)
6 0x00007ff99e377344 (C:\WINDOWS\System32\KERNEL32.DLL+0x17344)
7 0x00007ff9a00826b1 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x526b1)
clang-18: error: linker command failed due to signal (use -v to see invocation)