[LLVMbugs] [Bug 18375] New: crash when emitting code for constant initializer

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 3 16:02:53 PST 2014


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

            Bug ID: 18375
           Summary: crash when emitting code for constant initializer
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: MC
          Assignee: unassignedbugs at nondot.org
          Reporter: david.majnemer at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

consider:
$ cat b.ll
target datalayout = "e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
target triple = "i386-unknown-linux-gnu"

%struct.R = type { i32 }

@__executable_start = external global i8
@x = global i32 sub (i32 ptrtoint (i32* @x to i32), i32 ptrtoint (i8*
@__executable_start to i32)), align 4

compile with:
$ ~/llvm/build/bin/llc b.ll -o b.o -filetype=obj
llc: ~/llvm/src/lib/MC/MCAssembler.cpp:147: uint64_t
llvm::MCAsmLayout::getSymbolOffset(const llvm::MCSymbolData*) const: Assertion
`SD->getFragment() && "Invalid getOffset() on undefined symbol!"' failed.
0  llc             0x000000000184f4ef llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1  llc             0x000000000184f776
2  llc             0x000000000184f1ba
3  libpthread.so.0 0x00007f1432b9fcb0
4  libc.so.6       0x00007f1431ff4425 gsignal + 53
5  libc.so.6       0x00007f1431ff7b8b abort + 379
6  libc.so.6       0x00007f1431fed0ee
7  libc.so.6       0x00007f1431fed192
8  llc             0x000000000175c231
llvm::MCAsmLayout::getSymbolOffset(llvm::MCSymbolData const*) const + 1027
9  llc             0x000000000174570a
10 llc             0x000000000175e7df
llvm::MCAssembler::handleFixup(llvm::MCAsmLayout const&, llvm::MCFragment&,
llvm::MCFixup const&) + 143
11 llc             0x000000000175ec9c llvm::MCAssembler::Finish() + 1206
12 llc             0x000000000178c049 llvm::MCObjectStreamer::FinishImpl() +
123
13 llc             0x000000000177bc5d llvm::MCELFStreamer::FinishImpl() + 71
14 llc             0x0000000001791aaa llvm::MCStreamer::Finish() + 118
15 llc             0x0000000000f17def
llvm::AsmPrinter::doFinalization(llvm::Module&) + 3175
16 llc             0x0000000001705182
llvm::FPPassManager::doFinalization(llvm::Module&) + 88
17 llc             0x0000000001705596
18 llc             0x00000000017059fc
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 254
19 llc             0x0000000001705c0f
llvm::legacy::PassManager::run(llvm::Module&) + 39
20 llc             0x0000000000892640
21 llc             0x000000000089165a main + 237
22 libc.so.6       0x00007f1431fdf76d __libc_start_main + 237
23 llc             0x0000000000890fa9

-- 
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/20140104/926835d5/attachment.html>


More information about the llvm-bugs mailing list