[LLVMbugs] [Bug 8996] New: SPARC backend crashes when emitting dwarf debug information from dbg_value

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 17 21:39:54 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=8996

           Summary: SPARC backend crashes when emitting dwarf debug
                    information from dbg_value
           Product: new-bugs
           Version: trunk
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: venkatra at cs.wisc.edu
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=6019)
 --> (http://llvm.org/bugs/attachment.cgi?id=6019)
testcase

When generating code for the attached file, SPARC backend crashes. (See below)
The crash occurs because DwarfDebug::addVariableAddress calls
TFI->getFrameIndexReference() with the immediate value from a DBG_VALUE
instruction. But the frame index is already eliminated by the PEI pass. 

llc -march=sparc test/CodeGen/SPARC/bugpoint-reduced-simplified.ll

llc: ../llvm/include/llvm/CodeGen/MachineFrameInfo.h:373: int64_t
llvm::MachineFrameInfo::getObjectOffset(int) const: Assertion
`unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && "Invalid Object Idx!"'
failed.
1  llc             0x000000000133fb0c
2  libpthread.so.0 0x000000344bc0eb10
3  libc.so.6       0x000000344b030265 gsignal + 53
4  libc.so.6       0x000000344b031d10 abort + 272
5  libc.so.6       0x000000344b0296e6 __assert_fail + 246
6  llc             0x0000000000a0b608
llvm::MachineFrameInfo::getObjectOffset(int) const + 94
7  llc             0x00000000011af86d
llvm::TargetFrameLowering::getFrameIndexOffset(llvm::MachineFunction const&,
int) const + 45
8  llc             0x00000000011af722
llvm::TargetFrameLowering::getFrameIndexReference(llvm::MachineFunction const&,
int, unsigned int&) const + 112
9  llc             0x0000000000ebdf2d
llvm::DwarfDebug::addVariableAddress(llvm::DbgVariable*&, llvm::DIE*, long) +
113
10 llc             0x0000000000ebe546
llvm::DwarfDebug::constructVariableDIE(llvm::DbgVariable*, llvm::DbgScope*) +
1424
11 llc             0x0000000000ebe99e
llvm::DwarfDebug::constructScopeDIE(llvm::DbgScope*) + 604
12 llc             0x0000000000ebea02
llvm::DwarfDebug::constructScopeDIE(llvm::DbgScope*) + 704
13 llc             0x0000000000ebee64
llvm::DwarfDebug::endFunction(llvm::MachineFunction const*) + 972
14 llc             0x0000000000eab6a4 llvm::AsmPrinter::EmitFunctionBody() +
2080
15 llc             0x0000000000a082e1
llvm::AsmPrinter::runOnMachineFunction(llvm::MachineFunction&) + 47
16 llc             0x0000000000f41e8b
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 85
17 llc             0x0000000001279ce2
llvm::FPPassManager::runOnFunction(llvm::Function&) + 350
18 llc             0x0000000001279eb7
llvm::FPPassManager::runOnModule(llvm::Module&) + 81
19 llc             0x00000000012799a3
llvm::MPPassManager::runOnModule(llvm::Module&) + 381
20 llc             0x000000000127b133 llvm::PassManagerImpl::run(llvm::Module&)
+ 111
21 llc             0x000000000127b195 llvm::PassManager::run(llvm::Module&) +
33
22 llc             0x00000000009970e7 main + 2201
23 libc.so.6       0x000000344b01d994 __libc_start_main + 244
24 llc             0x0000000000995949
Stack dump:
0.      Program arguments: llc -march=sparc
1.      Running pass 'Function Pass Manager' on module '<stdin>'.
2.      Running pass 'Sparc Assembly Printer' on function
'@CheckReliabilityOfRef'
Aborted

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list