[LLVMbugs] [Bug 11479] New: [MC] llvm-mc crashes with symbol of .file directive same as a function name
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Dec 4 22:51:54 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=11479
Bug #: 11479
Summary: [MC] llvm-mc crashes with symbol of .file directive
same as a function name
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Core LLVM classes
AssignedTo: unassignedbugs at nondot.org
ReportedBy: lihaitao+llvmbugs at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 7669
--> http://llvm.org/bugs/attachment.cgi?id=7669
test case
llvm-mc crashes when compiling the attached t.s file.
The .s file is generated by a frontend which encodes .file directive value
without a suffix.
If the first line is '.file "t.bc" instead of '.file "t"', llvm-mc works as
expected.
$ llvm-mc -filetype=obj -o t.o t.s
llvm-mc: /home/***/src/llvm/include/llvm/MC/MCSymbol.h:111: const
llvm::MCSection &llvm::MCSymbol::getSection() const: Assertion `isInSection()
&& "Invalid accessor!"' failed.
$ llvm-mc -version
Low Level Virtual Machine (http://llvm.org/):
llvm version 3.1svn
DEBUG build with assertions.
Built Dec 5 2011 (10:03:25).
Default target: i386-pc-linux-gnu
Host CPU: corei7
(gdb) bt
#0 0xb7fe1424 in __kernel_vsyscall ()
#1 0xb7d46e71 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2 0xb7d4a34e in abort () at abort.c:92
#3 0xb7d3f888 in __assert_fail (assertion=0x8434fd3 "isInSection() &&
\"Invalid accessor!\"",
file=0x8434ff8 "/home/***/src/llvm/include/llvm/MC/MCSymbol.h", line=111,
function=0x843502a "const llvm::MCSection &llvm::MCSymbol::getSection() const")
at assert.c:81
#4 0x08232a17 in llvm::MCSymbol::getSection (this=0x86a8f90) at
/home/***/src/llvm/include/llvm/MC/MCSymbol.h:111
#5 0x0835a5e6 in llvm::MCObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl
(this=0x86aac18, Asm=..., DataA=..., FB=..., InSet=false, IsPCRel=true)
at /home/***/src/llvm/lib/MC/MCObjectWriter.cpp:84
#6 0x083064ac in llvm::ELFObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl
(this=0x86aac18, Asm=..., DataA=..., FB=..., InSet=false, IsPCRel=true)
at /home/***/src/llvm/lib/MC/ELFObjectWriter.cpp:1254
#7 0x083241a0 in llvm::MCAssembler::EvaluateFixup (this=0x86aaaa0, Layout=...,
Fixup=..., DF=0x86ac120, Target=..., Value=@0xbfffedc0)
at /home/***/src/llvm/lib/MC/MCAssembler.cpp:266
#8 0x08325a14 in llvm::MCAssembler::HandleFixup (this=0x86aaaa0, Layout=...,
F=..., Fixup=...) at /home/***/src/llvm/lib/MC/MCAssembler.cpp:555
#9 0x08326230 in llvm::MCAssembler::Finish (this=0x86aaaa0) at
/home/***/src/llvm/lib/MC/MCAssembler.cpp:624
#10 0x0835940d in llvm::MCObjectStreamer::Finish (this=0x86a71a0) at
/home/***/src/llvm/lib/MC/MCObjectStreamer.cpp:263
#11 0x083444be in llvm::MCELFStreamer::Finish (this=0x86a71a0) at
/home/***/src/llvm/lib/MC/MCELFStreamer.cpp:379
#12 0x08296803 in (anonymous namespace)::AsmParser::Run (this=0x86aae58,
NoInitialTextSection=false, NoFinalize=false)
at /home/elihait/src/llvm/lib/MC/MCParser/AsmParser.cpp:524
#13 0x08056fc9 in AssembleInput (ProgName=0xbffff9f6
"/home/***/local/rust/bin/llvm-mc") at
/home/elihait/src/llvm/tools/llvm-mc/llvm-mc.cpp:449
#14 0x08054288 in main (argc=5, argv=0xbffff854) at
/home/***/src/llvm/tools/llvm-mc/llvm-mc.cpp:517
--
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