<div dir="ltr">That's a crash in the compiler you are using, not a problem with lld, so I'd suggest following the instructions at the end of the crash report, and contacting <a href="mailto:support-hpc-sw@arm.com">support-hpc-sw@arm.com</a>.<div><br></div><div>It looks like the crash is happening during an optimisation pass, so you could try compiling at a lower optimisation level (replace -O3 with -O0 or -O1) as a workaround for now.<br><div><div><br></div><div><div>Oliver</div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 15 Jan 2020 at 09:32, Itaru Kitayama via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div>Can someone who's familiar with lld take a look?</div><div><br><div>[2980/3371] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/disassemble.c.o<br>[2981/3371] Building CXX object tools/lld/COFF/CMakeFiles/lldCOFF.dir/Writer.cpp.o<br>FAILED: tools/lld/COFF/CMakeFiles/lldCOFF.dir/Writer.cpp.o<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/bin/armclang++  -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/lld/COFF -I/fefs/home/r1050/projects/llvm-project/lld/COFF -I/fefs/home/r1050/projects/llvm-project/lld/include -Itools/lld/include -I/usr/include/libxml2 -Iinclude -I/fefs/home/r1050/projects/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG    -fno-exceptions -fno-rtti -std=c++14 -MD -MT tools/lld/COFF/CMakeFiles/lldCOFF.dir/Writer.cpp.o -MF tools/lld/COFF/CMakeFiles/lldCOFF.dir/Writer.cpp.o.d -o tools/lld/COFF/CMakeFiles/lldCOFF.dir/Writer.cpp.o -c /fefs/home/r1050/projects/llvm-project/lld/COFF/Writer.cpp<br>Stack dump:<br>0.       Program arguments: /opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9 -cc1 -triple aarch64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name Writer.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mllvm -memory-check-merge-threshold=500 -mllvm -max-dependences=20000 -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu generic -target-feature +neon -target-abi aapcs -fallow-half-arguments-and-returns -dwarf-column-info -debugger-tuning=gdb -ffunction-sections -fdata-sections -coverage-notes-file /fefs/home/r1050/work/build/202001151820/tools/lld/COFF/CMakeFiles/lldCOFF.dir/Writer.cpp.gcno -resource-dir /opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/lib/clang/9.0.1 -dependency-file tools/lld/COFF/CMakeFiles/lldCOFF.dir/Writer.cpp.o.d -sys-header-deps -MT tools/lld/COFF/CMakeFiles/lldCOFF.dir/Writer.cpp.o -D GTEST_HAS_RTTI=0 -D _GNU_SOURCE -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -I tools/lld/COFF -I /fefs/home/r1050/projects/llvm-project/lld/COFF -I /fefs/home/r1050/projects/llvm-project/lld/include -I tools/lld/include -I /usr/include/libxml2 -I include -I /fefs/home/r1050/projects/llvm-project/llvm/include -D NDEBUG -I/opt/arm/armpl-20.0.0_ThunderX2CN99_RHEL-7_arm-linux-compiler_20.0_aarch64-linux/include_common -I/opt/arm//arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/include -I/opt/arm/gcc-9.2.0_Generic-AArch64_RHEL-7_aarch64-linux/include -internal-isystem /opt/arm/gcc-9.2.0_Generic-AArch64_RHEL-7_aarch64-linux/lib/gcc/aarch64-linux-gnu/9.2.0/../../../../include/c++/9.2.0 -internal-isystem /opt/arm/gcc-9.2.0_Generic-AArch64_RHEL-7_aarch64-linux/lib/gcc/aarch64-linux-gnu/9.2.0/../../../../include/c++/9.2.0/aarch64-linux-gnu -internal-isystem /opt/arm/gcc-9.2.0_Generic-AArch64_RHEL-7_aarch64-linux/lib/gcc/aarch64-linux-gnu/9.2.0/../../../../include/c++/9.2.0/backward -internal-isystem /usr/local/include -internal-isystem /opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/lib/clang/9.0.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -pedantic -std=c++14 -fdeprecated-macro -fdebug-compilation-dir /fefs/home/r1050/work/build/202001151820 -ferror-limit 19 -fmessage-length 0 -fvisibility-inlines-hidden -fno-rtti -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -o tools/lld/COFF/CMakeFiles/lldCOFF.dir/Writer.cpp.o -x c++ /fefs/home/r1050/projects/llvm-project/lld/COFF/Writer.cpp<br>1. <eof> parser at end of file<br>2.   Per-module optimization passes<br>3.      Running pass 'CallGraph Pass Manager' on module '/fefs/home/r1050/projects/llvm-project/lld/COFF/Writer.cpp'.<br>4.       Running pass 'Loop Pass Manager' on function '@_ZN3lld4coff12_GLOBAL__N_16Writer13mergeSectionsEv'<br>5.  Running pass 'Loop Invariant Code Motion' on basic block '%37'<br> #0 0x00000000015c2188 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x15c2188)<br> #1 0x00000000015c0750 llvm::sys::RunSignalHandlers() (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x15c0750)<br> #2 0x00000000015c0870 SignalHandler(int) (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x15c0870)<br> #3 0x0000ffffad5f066c  0x66c sink(llvm::Instruction&, llvm::LoopInfo*, llvm::DominatorTree*, llvm::Loop const*, llvm::ICFLoopSafetyInfo*, llvm::MemorySSAUpdater*, llvm::OptimizationRemarkEmitter*)<br> #4 0x0000ffffad5f066c<br> #5 0x0000ffffad5f066c llvm::sinkRegion(llvm::DomTreeNodeBase<llvm::BasicBlock>*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::TargetLibraryInfo*, llvm::TargetTransformInfo*, llvm::Loop*, llvm::AliasSetTracker*, llvm::MemorySSAUpdater*, llvm::ICFLoopSafetyInfo*, llvm::SinkAndHoistLICMFlags&, llvm::OptimizationRemarkEmitter*) (+0x66c)<br> #6 0x00000000014228f8 (anonymous namespace)::LoopInvariantCodeMotion::runOnLoop(llvm::Loop*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::TargetLibraryInfo*, llvm::TargetTransformInfo*, llvm::ScalarEvolution*, llvm::MemorySSA*, llvm::OptimizationRemarkEmitter*, bool) (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x14228f8)<br> #7 0x0000000001424d30 (anonymous namespace)::LegacyLICMPass::runOnLoop(llvm::Loop*, llvm::LPPassManager&) (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x1424d30)<br> #8 0x0000000001425b60 llvm::LPPassManager::runOnFunction(llvm::Function&) (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x1425b60)<br> #9 0x00000000014276b0 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x14276b0)<br>#10 0x0000000002481a90 (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x2481a90)<br>#11 0x00000000010c98e8 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x10c98e8)<br>#12 0x00000000024559b8 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x24559b8)<br>#13 0x00000000010c8d14 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x10c8d14)<br>#14 0x00000000017f3e74 clang::ParseAST(clang::Sema&, bool, bool) (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x17f3e74)<br>#15 0x00000000021ae9dc clang::FrontendAction::Execute() (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x21ae9dc)<br>#16 0x0000000002ce0ecc clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x2ce0ecc)<br>#17 0x0000000001c8c5e0 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x1c8c5e0)<br>#18 0x0000000001c55c80 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x1c55c80)<br>#19 0x0000000001d3f830 main (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x1d3f830)<br>#20 0x00000000008b9ea0 __libc_start_main (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x8b9ea0)<br>#21 0x000000000086cc38 _start (/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9+0x86cc38)<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x28)[0x15c2188]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9(_ZN4llvm3sys17RunSignalHandlersEv+0x48)[0x15c0750]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9[0x15c0870]<br>[0xffffad5f066c]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9[0x14228f8]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9(_ZN4llvm10sinkRegionEPNS_15DomTreeNodeBaseINS_10BasicBlockEEEPNS_9AAResultsEPNS_8LoopInfoEPNS_13DominatorTreeEPNS_17TargetLibraryInfoEPNS_19TargetTransformInfoEPNS_4LoopEPNS_15AliasSetTrackerEPNS_16MemorySSAUpdaterEPNS_17ICFLoopSafetyInfoERNS_21SinkAndHoistLICMFlagsEPNS_25OptimizationRemarkEmitterE+0x488)[0x1424d30]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9[0x1425b60]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9[0x14276b0]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9(_ZN4llvm13LPPassManager13runOnFunctionERNS_8FunctionE+0x6d8)[0x2481a90]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x458)[0x10c98e8]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9[0x24559b8]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x2fc)[0x10c8d14]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsERKN4llvm10DataLayoutEPNSE_6ModuleENS_13BackendActionESt10unique_ptrINSE_17raw_pwrite_streamESt14default_deleteISM_EE+0x5a4)[0x17f3e74]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9[0x21ae9dc]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9(_ZN5clang8ParseASTERNS_4SemaEbb+0x3dc)[0x2ce0ecc]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9(_ZN5clang14FrontendAction7ExecuteEv+0xa0)[0x1c8c5e0]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x268)[0x1c55c80]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x5d0)[0x1d3f830]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x530)[0x8b9ea0]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9(main+0x2170)[0x86cc38]<br>/lib64/libc.so.6(__libc_start_main+0xf0)[0xffffad0615d4]<br>/opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/llvm-bin/clang-9[0x8b7f14]<br>clang-9: error: unable to execute command: Segmentation fault (core dumped)<br>clang-9: error: clang frontend command failed due to signal (use -v to see invocation)<br>Arm C/C++/Fortran Compiler version 20.0 (build number 51) (based on LLVM 9.0.1)<br>Target: aarch64-unknown-linux-gnu<br>Thread model: posix<br>InstalledDir: /opt/arm/arm-linux-compiler-20.0_Generic-AArch64_RHEL-7_aarch64-linux/bin<br>clang-9: note: diagnostic msg: PLEASE submit a bug report to <a href="mailto:support-hpc-sw@arm.com" target="_blank">support-hpc-sw@arm.com</a> including:<br>1. This complete error report (product information and crash backtrace)<br>2. System platform (for example, the output from 'cat /etc/issue')<br>3. Preprocessed source (listed below where available)<br>4. Associated run script (listed below where available)<br>clang-9: note: diagnostic msg:<br>********************<br><br>PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:<br>Preprocessed source(s) and associated run script(s) are located at:<br>clang-9: note: diagnostic msg: /tmp/Writer-db2167.cpp<br>clang-9: note: diagnostic msg: /tmp/Writer-db2167.sh<br>clang-9: note: diagnostic msg:<br><br>********************<br></div></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>