[LLVMbugs] [Bug 10926] New: llvm-dwarfdump infinite loop
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Sep 13 23:41:22 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10926
Summary: llvm-dwarfdump infinite loop
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: nicholas at mxc.ca
CC: llvmbugs at cs.uiuc.edu, benny.kra at gmail.com
Created an attachment (id=7268)
--> (http://llvm.org/bugs/attachment.cgi?id=7268)
testcase
The attached file causes an infinite loop in llvm-dwarfdump:
[...]
.debug_aranges contents:
^C
Program received signal SIGINT, Interrupt.
0x080691d1 in llvm::DWARFDebugArangeSet::extract (this=0xffffd750, data=...,
offset_ptr=0xffffd770) at DWARFDebugArangeSet.cpp:82
82 while (first_tuple_offset < header_size)
(gdb) bt
#0 0x080691d1 in llvm::DWARFDebugArangeSet::extract (this=0xffffd750,
data=..., offset_ptr=0xffffd770) at DWARFDebugArangeSet.cpp:82
#1 0x0806446d in llvm::DWARFContext::dump (this=0x80ed0d8, OS=...)
at DWARFContext.cpp:26
#2 0x0804c00c in DumpInput (Filename=...) at llvm-dwarfdump.cpp:79
#3 0x0804d07f in
std::for_each<__gnu_cxx::__normal_iterator<std::basic_string<char>*,
std::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > >
>, void (*)(llvm::StringRef const&)> (__first=..., __last=...,
__f=0x804bb5b <DumpInput(llvm::StringRef const&)>)
at /usr/include/c++/4.6/bits/stl_algo.h:4302
#4 0x0804c158 in main (argc=2, argv=0xffffd9e4) at llvm-dwarfdump.cpp:94
(gdb) p first_tuple_offset
$1 = 0
(gdb) p header_size
$2 = 12
(gdb) n
83 first_tuple_offset += tuple_size;
(gdb) p tuple_size
$3 = 0
(gdb) n
82 while (first_tuple_offset < header_size)
(gdb)
83 first_tuple_offset += tuple_size;
The .o file was built from this C code:
void test(int N, double* G) {
for (long j = 1; j < 1000; j++)
G[j] = G[j] + G[j-1];
}
by gcc 4.4.6.
--
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