[llvm-bugs] [Bug 36466] New: Assertion `I != M+Size && I->FromReg == RegNum && "Invalid RegNum"' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 21 04:28:36 PST 2018


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

            Bug ID: 36466
           Summary: Assertion `I != M+Size && I->FromReg == RegNum &&
                    "Invalid RegNum"' failed
           Product: tools
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llvm-dwarfdump
          Assignee: unassignedbugs at nondot.org
          Reporter: dantipov at nvidia.com
                CC: llvm-bugs at lists.llvm.org

The following llvm-dwarfdump assertion failure may be caused by dumping
Firefox's core library libxul.so:

 llvm-dwarfdump: /home/dantipov/llvm/6.0.0/source/lib/MC/MCRegisterInfo.cpp:87:
int llvm::MCRegisterInfo::getLLVMRegNum(unsigned int, bool) const: Assertion `I
!= M+Size && I->FromReg == RegNum && "Invalid RegNum"' failed.
#0 0x0000000000758b08 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/dantipov/llvm/6.0.0/source/lib/Support/Unix/Signals.inc:398:0
#1 0x0000000000758b9b PrintStackTraceSignalHandler(void*)
/home/dantipov/llvm/6.0.0/source/lib/Support/Unix/Signals.inc:462:0
#2 0x0000000000757040 llvm::sys::RunSignalHandlers()
/home/dantipov/llvm/6.0.0/source/lib/Support/Signals.cpp:49:0
#3 0x000000000075847d SignalHandler(int)
/home/dantipov/llvm/6.0.0/source/lib/Support/Unix/Signals.inc:252:0
#4 0x00007f3a7ce17af0 __restore_rt (/lib64/libpthread.so.0+0x12af0)
#5 0x00007f3a7b91766b __GI_raise
/usr/src/debug/glibc-2.26-137-g247c1ddd30/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#6 0x00007f3a7b919381 __GI_abort
/usr/src/debug/glibc-2.26-137-g247c1ddd30/stdlib/abort.c:81:0
#7 0x00007f3a7b90f8fa __assert_fail_base
/usr/src/debug/glibc-2.26-137-g247c1ddd30/assert/assert.c:89:0
#8 0x00007f3a7b90f972 (/lib64/libc.so.6+0x2f972)
#9 0x0000000000597124 llvm::MCRegisterInfo::getLLVMRegNum(unsigned int, bool)
const /home/dantipov/llvm/6.0.0/source/lib/MC/MCRegisterInfo.cpp:88:0
#10 0x0000000000484a44 llvm::prettyPrintRegisterOp(llvm::raw_ostream&, unsigned
char, unsigned long*, llvm::MCRegisterInfo const*, bool)
/home/dantipov/llvm/6.0.0/source/lib/DebugInfo/DWARF/DWARFExpression.cpp:206:0
#11 0x0000000000484c4a
llvm::DWARFExpression::Operation::print(llvm::raw_ostream&,
llvm::DWARFExpression const*, llvm::MCRegisterInfo const*, bool)
/home/dantipov/llvm/6.0.0/source/lib/DebugInfo/DWARF/DWARFExpression.cpp:237:0
#12 0x0000000000484e81 llvm::DWARFExpression::print(llvm::raw_ostream&,
llvm::MCRegisterInfo const*)
/home/dantipov/llvm/6.0.0/source/lib/DebugInfo/DWARF/DWARFExpression.cpp:263:0
#13 0x000000000047590c dumpExpression(llvm::raw_ostream&, llvm::ArrayRef<char>,
bool, unsigned int, llvm::MCRegisterInfo const*)
/home/dantipov/llvm/6.0.0/source/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp:37:0
#14 0x0000000000475a8d
llvm::DWARFDebugLoc::LocationList::dump(llvm::raw_ostream&, bool, unsigned int,
llvm::MCRegisterInfo const*, unsigned int) const
/home/dantipov/llvm/6.0.0/source/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp:43:0
#15 0x000000000047de28 dumpLocation(llvm::raw_ostream&, llvm::DWARFFormValue&,
llvm::DWARFUnit*, unsigned int, llvm::DIDumpOptions)
/home/dantipov/llvm/6.0.0/source/lib/DebugInfo/DWARF/DWARFDie.cpp:113:0
#16 0x000000000047eb32 dumpAttribute(llvm::raw_ostream&, llvm::DWARFDie const&,
unsigned int*, llvm::dwarf::Attribute, llvm::dwarf::Form, unsigned int,
llvm::DIDumpOptions)
/home/dantipov/llvm/6.0.0/source/lib/DebugInfo/DWARF/DWARFDie.cpp:250:0
#17 0x000000000048024b llvm::DWARFDie::dump(llvm::raw_ostream&, unsigned int,
llvm::DIDumpOptions) const
/home/dantipov/llvm/6.0.0/source/lib/DebugInfo/DWARF/DWARFDie.cpp:489:0
#18 0x000000000048030a llvm::DWARFDie::dump(llvm::raw_ostream&, unsigned int,
llvm::DIDumpOptions) const
/home/dantipov/llvm/6.0.0/source/lib/DebugInfo/DWARF/DWARFDie.cpp:498:0
#19 0x000000000048030a llvm::DWARFDie::dump(llvm::raw_ostream&, unsigned int,
llvm::DIDumpOptions) const
/home/dantipov/llvm/6.0.0/source/lib/DebugInfo/DWARF/DWARFDie.cpp:498:0
#20 0x00000000004298c2 llvm::DWARFCompileUnit::dump(llvm::raw_ostream&,
llvm::DIDumpOptions)
/home/dantipov/llvm/6.0.0/source/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp:33:0
#21 0x000000000042b52f operator()
/home/dantipov/llvm/6.0.0/source/lib/DebugInfo/DWARF/DWARFContext.cpp:311:0
#22 0x000000000042b52f llvm::DWARFContext::dump(llvm::raw_ostream&,
llvm::DIDumpOptions, std::array<llvm::Optional<unsigned long>,
23ul>)::{lambda(bool, char const*, llvm::DWARFSection,
llvm::iterator_range<std::unique_ptr<llvm::DWARFCompileUnit,
std::default_delete<llvm::DWARFCompileUnit> >*>)#2}::operator()(bool, char
const*, llvm::DWARFSection,
llvm::iterator_range<std::unique_ptr<llvm::DWARFCompileUnit,
std::default_delete<llvm::DWARFCompileUnit> >*>) const
(/home/dantipov/.local/llvm-6.0.0/bin/llvm-dwarfdump+0x42b52f)
#23 0x000000000042bc8b llvm::DWARFContext::dump(llvm::raw_ostream&,
llvm::DIDumpOptions, std::array<llvm::Optional<unsigned long>, 23ul>)
/home/dantipov/llvm/6.0.0/source/lib/DebugInfo/DWARF/DWARFContext.cpp:315:0
#24 0x000000000040d8fe dumpObjectFile(llvm::object::ObjectFile&,
llvm::DWARFContext&, llvm::Twine, llvm::raw_ostream&)
/home/dantipov/llvm/6.0.0/source/tools/llvm-dwarfdump/llvm-dwarfdump.cpp:389:0
#25 0x000000000041dbdf std::_Function_handler<bool (llvm::object::ObjectFile&,
llvm::DWARFContext&, llvm::Twine, llvm::raw_ostream&), bool
(*)(llvm::object::ObjectFile&, llvm::DWARFContext&, llvm::Twine,
llvm::raw_ostream&)>::_M_invoke(std::_Any_data const&,
llvm::object::ObjectFile&, llvm::DWARFContext&, llvm::Twine&&,
llvm::raw_ostream&) /usr/include/c++/7/bits/std_function.h:302:0
#26 0x0000000000419915 std::function<bool (llvm::object::ObjectFile&,
llvm::DWARFContext&, llvm::Twine,
llvm::raw_ostream&)>::operator()(llvm::object::ObjectFile&,
llvm::DWARFContext&, llvm::Twine, llvm::raw_ostream&) const
/usr/include/c++/7/bits/std_function.h:707:0
#27 0x000000000040e091 handleBuffer(llvm::StringRef, llvm::MemoryBufferRef,
std::function<bool (llvm::object::ObjectFile&, llvm::DWARFContext&,
llvm::Twine, llvm::raw_ostream&)>, llvm::raw_ostream&)
/home/dantipov/llvm/6.0.0/source/tools/llvm-dwarfdump/llvm-dwarfdump.cpp:437:0
#28 0x000000000040e7dd handleFile(llvm::StringRef, std::function<bool
(llvm::object::ObjectFile&, llvm::DWARFContext&, llvm::Twine,
llvm::raw_ostream&)>, llvm::raw_ostream&)
/home/dantipov/llvm/6.0.0/source/tools/llvm-dwarfdump/llvm-dwarfdump.cpp:471:0
#29 0x000000000040fb86 main
/home/dantipov/llvm/6.0.0/source/tools/llvm-dwarfdump/llvm-dwarfdump.cpp:589:0
#30 0x00007f3a7b90100a __libc_start_main
/usr/src/debug/glibc-2.26-137-g247c1ddd30/csu/../csu/libc-start.c:342:0
#31 0x00000000004073ca _start
(/home/dantipov/.local/llvm-6.0.0/bin/llvm-dwarfdump+0x4073ca)
Stack dump:
0.      Program arguments: /home/dantipov/.local/llvm-6.0.0/bin/llvm-dwarfdump
libxul.so 
Aborted (core dumped)

Since an input is 1.5G raw and 300M compressed, it's available separately at
http://37.139.80.10/tmp/libxul.so.xz (MD5 cd452ac1fe3f88b51de133975fd55e08).

My guess is that llvm-dwarfdump can't handle DW_AT_data_member_location DIEs
created from so-called "unified" CUs (where x.cc uses #include "y.cc", #include
"z.cc" etc).

-- 
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/20180221/50da7172/attachment-0001.html>


More information about the llvm-bugs mailing list