[llvm] [LLVM][DWARF] Make some effort to avoid duplicates in .debug_ranges. (PR #106614)
Jake Egan via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 12:41:51 PDT 2024
jakeegan wrote:
Hi, this test is failing on the AIX bot, could you take a look?
```
Assertion failed: Section && "Cannot switch to a null section!", file /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/lib/MC/MCStreamer.cpp, line 1260, virtual void llvm::MCStreamer::switchSection(MCSection *, uint32_t)()
```
https://lab.llvm.org/buildbot/#/builders/64/builds/862/steps/6/logs/FAIL__LLVM__debug-ranges-duplication_ll
Here is the backtrace:
```
#0 0x09000000005cdfe4 in pthread_kill () from /usr/lib/libpthreads.a(shr_xpg5_64.o)
#1 0x09000000005cd808 in _p_raise () from /usr/lib/libpthreads.a(shr_xpg5_64.o)
#2 0x0900000000040e8c in raise () from /usr/lib/libc.a(shr_64.o)
#3 0x090000000005efbc in abort () from /usr/lib/libc.a(shr_64.o)
#4 0x09000000000f3b3c in __assert_c99 () from /usr/lib/libc.a(shr_64.o)
#5 0x000000010059c5c0 in llvm::MCStreamer::switchSection(llvm::MCSection*, unsigned int) ()
#6 0x000000010749d3b4 in llvm::DwarfDebug::emitDebugRangesImpl (this=0x12108ce10, Holder=..., Section=<optimized out>)
at llvm-project/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:3160
#7 0x000000010748bb2c in llvm::DwarfDebug::emitDebugRanges (this=0x12108ce10)
at llvm-project/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:3178
#8 llvm::DwarfDebug::endModule (this=0x12108ce10) at llvm-project/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1456
#9 0x00000001074c5010 in llvm::AsmPrinter::doFinalization (this=0x121081af0, M=...)
at llvm-project/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:2449
#10 0x000000010759c304 in (anonymous namespace)::PPCAIXAsmPrinter::doFinalization (this=0x121081af0, M=...)
at llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:3208
#11 0x00000001001da1a4 in llvm::FPPassManager::doFinalization (this=0x121074a70, M=...)
at llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1472
#12 0x0000000106e1d654 in (anonymous namespace)::MPPassManager::runOnModule (this=0x121065790, M=...)
at llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1559
#13 llvm::legacy::PassManagerImpl::run (this=<optimized out>, M=...)
at llvm-project/llvm/lib/IR/LegacyPassManager.cpp:541
#14 0x0000000106e1ced4 in llvm::legacy::PassManager::run (this=<optimized out>, M=...)
at llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1650
#15 0x00000001061f826c in (anonymous namespace)::EmitAssemblyHelper::RunCodegenPipeline (this=<optimized out>, Action=<optimized out>,
OS=..., DwoOS=...) at llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1162
#16 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly (this=<optimized out>, Action=<optimized out>, OS=..., BC=<optimized out>) at llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1185
#17 clang::EmitBackendOutput (Diags=..., HeaderOpts=..., CGOpts=..., TOpts=..., LOpts=..., TDesc=..., M=0x12104e330,
Action=<optimized out>, VFS=..., OS=..., BC=<optimized out>)
at llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1347
#18 0x000000010855c624 in clang::CodeGenAction::ExecuteAction (this=<optimized out>)
at llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:1222
#19 0x00000001058c3348 in clang::FrontendAction::Execute (this=0x121046850)
at llvm-project/clang/lib/Frontend/FrontendAction.cpp:1078
#20 0x00000001057b22c8 in clang::CompilerInstance::ExecuteAction (this=0x121042cb0, Act=...)
at llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1061
#21 0x000000010788af50 in clang::ExecuteCompilerInvocation (Clang=0x121042cb0)
at llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:280
#22 0x000000010339474c in cc1_main (Argv=..., Argv0=<optimized out>, MainAddr=<optimized out>)
at llvm-project/clang/tools/driver/cc1_main.cpp:285
#23 0x0000000103392070 in ExecuteCC1Tool (ArgV=..., ToolContext=...)
at llvm-project/clang/tools/driver/driver.cpp:215
#24 0x00000001091810bc in clang_main(int, char**, llvm::ToolContext const&)::$_0::operator()(llvm::SmallVectorImpl<char const*>&) const
(this=0xffffffffffffffff, ArgV=...) at llvm-project/clang/tools/driver/driver.cpp:355
#25 llvm::function_ref<int (llvm::SmallVectorImpl<char const*>&)>::callback_fn<clang_main(int, char**, llvm::ToolContext const&)::$_0>(long, llvm::SmallVectorImpl<char const*>&) (callable=-1, params=...)
at llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45
#26 0x0000000107991bfc in llvm::function_ref<int (llvm::SmallVectorImpl<char const*>&)>::operator()(llvm::SmallVectorImpl<char const*>&) const (this=<optimized out>, params=...) at llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68
#27 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) const::$_0::operator()() const (this=0xfffffffffffdb80)
at llvm-project/clang/lib/Driver/Job.cpp:440
#28 llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) const::$_0>(long) (
callable=1152921504606837632) at llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45
#29 0x0000000103ad1424 in llvm::function_ref<void ()>::operator()() const (this=<optimized out>)
at llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68
#30 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (this=<optimized out>, Fn=...)
at llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:426
#31 0x0000000107991a30 in clang::driver::CC1Command::Execute (this=0xfffffffffffdbb0, Redirects=..., ErrMsg=<optimized out>,
ExecutionFailed=<optimized out>) at llvm-project/clang/lib/Driver/Job.cpp:440
#32 0x000000010917997c in clang::driver::Compilation::ExecuteCommand (this=0x1210429d0, C=..., FailingCommand=warning: (Internal error: pc 0x0 in read in CU, but not in symtab.)
warning: (Error: pc 0x0 in address map, but not in symtab.)
@0xfffffffffffe1b8: 0x0,
LogOnly=<optimized out>) at llvm-project/clang/lib/Driver/Compilation.cpp:199
#33 0x00000001091791bc in clang::driver::Compilation::ExecuteJobs (this=0x1210429d0, Jobs=..., FailingCommands=...,
LogOnly=<optimized out>) at llvm-project/clang/lib/Driver/Compilation.cpp:253
#34 0x0000000109181918 in clang::driver::Driver::ExecuteCompilation (this=0xfffffffffffe4b8, C=..., FailingCommands=...)
at llvm-project/clang/lib/Driver/Driver.cpp:1943
#35 0x00000001000168ec in clang_main (Argc=<optimized out>, Argv=<optimized out>, ToolContext=...)
at llvm-project/clang/tools/driver/driver.cpp:391
#36 0x00000001000009fc in main (argc=5, argv=0xffffffffffff8b0)
at build/tools/clang/tools/driver/clang-driver.cpp:17
```
https://github.com/llvm/llvm-project/pull/106614
More information about the llvm-commits
mailing list