-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Open
Labels
LTOLink time optimization (regular/full LTO or ThinLTO)Link time optimization (regular/full LTO or ThinLTO)backend:X86crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]
Description
Hello:
When compiling a program under Windows using -fsanitize=cfi -flto -fvisibility=hidden the following error occurs:
LLVM ERROR: Associative COMDAT symbol '_ZNSt3__14endlB8ne190103IcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_' does not exist.
followed by:
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: C:/msys64/clang64/bin/ld.lld -m i386pep -Bdynamic -o c4edit.exe C:/msys64/clang64/lib/crt2.o C:/msys64/clang64/lib/crtbegin.o -LC:/msys64/clang64/x86_64-w64-mingw32/lib -LC:/msys64/clang64/x86_64-w64-mingw32/mingw/lib -LC:/msys64/clang64/lib -LC:/msys64/clang64/lib/clang/19/lib/windows CMakeFiles/c4edit.dir/src/main.cpp.obj --out-implib libc4edit.dll.a --major-image-version 0 --minor-image-version 0 libc4.a D:/Development/CLionProjects/lib/libz.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -plugin-opt=mcpu=x86-64 -plugin-opt=O3 -lc++ -lssp_nonshared -lssp -lmingw32 C:/msys64/clang64/lib/clang/19/lib/windows/libclang_rt.builtins-x86_64.a -lunwind -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 C:/msys64/clang64/lib/clang/19/lib/windows/libclang_rt.builtins-x86_64.a -lunwind -lmoldname -lmingwex -lmsvcrt -lkernel32 C:/msys64/clang64/lib/crtend.o
1. Running pass 'Function Pass Manager' on module 'ld-temp.o'.
2. Running pass 'X86 Assembly Printer' on function '@_ZNSt3__14endlB8ne190103IcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_.cfi'
Exception Code: 0xC000001D
#0 0x00007ff9cb60f5d6 HandleAbort (C:\msys64\clang64\bin\libLLVM-19.dll+0xedf5d6)
#1 0x00007ffaca6c1ee9 (C:\WINDOWS\System32\ucrtbase.dll+0xc1ee9)
#2 0x00007ffaca6a5011 (C:\WINDOWS\System32\ucrtbase.dll+0xa5011)
#3 0x00007ff9cb5944b3 llvm::report_fatal_error(llvm::Twine const&, bool) (C:\msys64\clang64\bin\libLLVM-19.dll+0xe644b3)
#4 0x00007ff9cb05e092 llvm::Function::getSectionPrefix() const (C:\msys64\clang64\bin\libLLVM-19.dll+0x92e092)
#5 0x00007ff9cb05dd19 llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal(llvm::GlobalObject const*, llvm::SectionKind, llvm::TargetMachine const&) const (C:\msys64\clang64\bin\libLLVM-19.dll+0x92dd19)
#6 0x00007ff9cb046c5d llvm::TargetLoweringObjectFile::SectionForGlobal(llvm::GlobalObject const*, llvm::SectionKind, llvm::TargetMachine const&) const (C:\msys64\clang64\bin\libLLVM-19.dll+0x916c5d)
#7 0x00007ff9cb0462e0 llvm::AsmPrinter::emitFunctionHeader() (C:\msys64\clang64\bin\libLLVM-19.dll+0x9162e0)
#8 0x00007ff9cb041a52 llvm::AsmPrinter::emitFunctionBody() (C:\msys64\clang64\bin\libLLVM-19.dll+0x911a52)
#9 0x00007ff9cb040dbe llvm::X86AsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (C:\msys64\clang64\bin\libLLVM-19.dll+0x910dbe)
#10 0x00007ff9caa92258 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (C:\msys64\clang64\bin\libLLVM-19.dll+0x362258)
#11 0x00007ff9ca845da4 llvm::FPPassManager::runOnFunction(llvm::Function&) (C:\msys64\clang64\bin\libLLVM-19.dll+0x115da4)
#12 0x00007ff9ca845771 llvm::FPPassManager::runOnModule(llvm::Module&) (C:\msys64\clang64\bin\libLLVM-19.dll+0x115771)
#13 0x00007ff9ca8451f2 llvm::legacy::PassManagerImpl::run(llvm::Module&) (C:\msys64\clang64\bin\libLLVM-19.dll+0x1151f2)
#14 0x00007ff9cc44fd97 llvm::lto::backend(llvm::lto::Config const&, std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (C:\msys64\clang64\bin\libLLVM-19.dll+0x1d1fd97)
#15 0x00007ff9cc44f475 llvm::lto::backend(llvm::lto::Config const&, std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (C:\msys64\clang64\bin\libLLVM-19.dll+0x1d1f475)
#16 0x00007ff9cc44228b llvm::lto::LTO::runRegularLTO(std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) (C:\msys64\clang64\bin\libLLVM-19.dll+0x1d1228b)
#17 0x00007ff9cc44154f llvm::lto::LTO::run(std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::__1::function<llvm::Expected<std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>> (unsigned int, llvm::StringRef, llvm::Twine const&)>) (C:\msys64\clang64\bin\libLLVM-19.dll+0x1d1154f)
#18 0x00007ff6830e50f2 lld::coff::BitcodeCompiler::compile() (C:\msys64\clang64\bin\ld.lld.exe+0x3050f2)
#19 0x00007ff682e88209 lld::coff::SymbolTable::compileBitcodeFiles() (C:\msys64\clang64\bin\ld.lld.exe+0xa8209)
#20 0x00007ff682df9e9c lld::coff::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (C:\msys64\clang64\bin\ld.lld.exe+0x19e9c)
#21 0x00007ff682df0590 lld::coff::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (C:\msys64\clang64\bin\ld.lld.exe+0x10590)
#22 0x00007ff682e646bb lld::mingw::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (C:\msys64\clang64\bin\ld.lld.exe+0x846bb)
#23 0x00007ff682de2685 lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) (C:\msys64\clang64\bin\ld.lld.exe+0x2685)
#24 0x00007ff682de11d9 lld_main(int, char**, llvm::ToolContext const&) (C:\msys64\clang64\bin\ld.lld.exe+0x11d9)
#25 0x00007ff682de1075 main (C:\msys64\clang64\bin\ld.lld.exe+0x1075)
#26 0x00007ff682de17f3 WinMainCRTStartup (C:\msys64\clang64\bin\ld.lld.exe+0x17f3)
#27 0x00007ff682de1856 mainCRTStartup (C:\msys64\clang64\bin\ld.lld.exe+0x1856)
#28 0x00007ffacc21e8d7 (C:\WINDOWS\System32\KERNEL32.DLL+0x2e8d7)
#29 0x00007ffaccd3fbcc (C:\WINDOWS\SYSTEM32\ntdll.dll+0xdfbcc)
clang++: error: linker command failed due to signal (use -v to see invocation)
ninja: build stopped: subcommand failed.
clang -v shows:
PS D:\Development\CLionProjects\civ4\c4> clang -v
clang version 19.1.3
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: C:/msys64/clang64/bin
PS D:\Development\CLionProjects\civ4\c4>
Puszek997
Metadata
Metadata
Assignees
Labels
LTOLink time optimization (regular/full LTO or ThinLTO)Link time optimization (regular/full LTO or ThinLTO)backend:X86crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]