[llvm-bugs] [Bug 26163] New: Assertion failed: (Offset <= PieceOffset && "overlapping or duplicate pieces"), function finalize, file /home/at718/freebsd/lib/clang/libllvmasmprinter/../../../contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp, line 1561.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jan 15 11:45:29 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26163

            Bug ID: 26163
           Summary: Assertion failed: (Offset <= PieceOffset &&
                    "overlapping or duplicate pieces"), function finalize,
                    file
                    /home/at718/freebsd/lib/clang/libllvmasmprinter/../../
                    ../contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp,
                    line 1561.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: andrew at fubar.geek.nz
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 15639
  --> https://llvm.org/bugs/attachment.cgi?id=15639&action=edit
Minimised test case

The attached code crashes llvm when building at least for arm.

I'm using the following to build:

/home/at718/obj/arm.arm/home/at718/freebsd/tmp/usr/bin/cc -cc1 -triple
armv4t--freebsd11.0-gnueabi -emit-obj -debug-info-kind=standalone -O2 -x c
parser-a642a1.c

I'm getting this error:

Assertion failed: (Offset <= PieceOffset && "overlapping or duplicate pieces"),
function finalize, file
/home/at718/freebsd/lib/clang/libllvmasmprinter/../../../contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp,
line 1561.

The trace looks like:

(lldb) target create
"/home/at718/obj/arm.arm/home/at718/freebsd/tmp/usr/bin/cc" --core "cc.core"
Core file '/home/at718/creduce/cc.core' (x86_64) was loaded.
(lldb) bt
* thread #1: tid = 0, 0x00000000021d7899 cc`handle_signal + 217, name = 'cc',
stop reason = signal SIGSEGV
  * frame #0: 0x00000000021d7899 cc`handle_signal + 217
    frame #1: 0x00000000021d7499 cc`thr_sighandler + 297
    frame #2: 0x00007ffffffff003
    frame #3: 0x0000000002272b5a cc`__assert + 74
    frame #4: 0x0000000001918e44
cc`llvm::DebugLocEntry::finalize(llvm::AsmPrinter const&,
llvm::DebugLocStream::ListBuilder&, llvm::DIBasicType const*) + 804
    frame #5: 0x0000000001918807
cc`llvm::DwarfDebug::collectVariableInfo(llvm::DwarfCompileUnit&,
llvm::DISubprogram const*, llvm::DenseSet<std::__1::pair<llvm::DILocalVariable
const*, llvm::DILocation const*>,
llvm::DenseMapInfo<std::__1::pair<llvm::DILocalVariable const*,
llvm::DILocation const*> > >&) + 1047
    frame #6: 0x0000000001919de3
cc`llvm::DwarfDebug::endFunction(llvm::MachineFunction const*) + 355
    frame #7: 0x00000000018fdd2a cc`llvm::AsmPrinter::EmitFunctionBody() + 5514
    frame #8: 0x00000000013951e6
cc`llvm::ARMAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) + 422
    frame #9: 0x0000000001b2150a
cc`llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 122
    frame #10: 0x0000000002033d7b
cc`llvm::FPPassManager::runOnFunction(llvm::Function&) + 315
    frame #11: 0x0000000002033fab
cc`llvm::FPPassManager::runOnModule(llvm::Module&) + 43
    frame #12: 0x0000000002034419
cc`llvm::legacy::PassManagerImpl::run(llvm::Module&) + 809
    frame #13: 0x000000000066bf8a
cc`clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*)
+ 8506
    frame #14: 0x0000000000669922
cc`clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 498
    frame #15: 0x0000000000867685 cc`clang::ParseAST(clang::Sema&, bool, bool)
+ 549
    frame #16: 0x00000000006684e4 cc`clang::CodeGenAction::ExecuteAction() +
116
    frame #17: 0x0000000000442c5b cc`clang::FrontendAction::Execute() + 75
    frame #18: 0x0000000000466c41
cc`clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1073
    frame #19: 0x000000000040af07
cc`clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3143
    frame #20: 0x0000000000400872 cc`cc1_main(llvm::ArrayRef<char const*>, char
const*, void*) + 1122
    frame #21: 0x0000000000408f17 cc`main + 11207
    frame #22: 0x000000000040030f cc`_start + 367
(lldb)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160115/f169bc1e/attachment-0001.html>


More information about the llvm-bugs mailing list