-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Description
| Bugzilla Link | 10926 |
| Resolution | FIXED |
| Resolved on | Sep 14, 2011 17:45 |
| Version | unspecified |
| OS | Linux |
| Attachments | testcase |
| CC | @d0k |
Extended Description
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, std::vector<std::basic_string, std::allocator<std::basic_string > > >, 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.