[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/11302] Segfault in _bfd_dwarf2_find_nearest_line
From: |
loose at astron dot nl |
Subject: |
[Bug binutils/11302] Segfault in _bfd_dwarf2_find_nearest_line |
Date: |
3 Mar 2010 16:10:48 -0000 |
------- Additional Comments From loose at astron dot nl 2010-03-03 16:10
-------
Created an attachment (id=4642)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4642&action=view)
Partial patch fixes most (or all?) segfaults
Here's a minimal patch that fixes most segfaults. I.e., I have not been able to
produce segfaults anymore. I guess you guys know how to properly patch dwarf2.c
(and some other files?).
Note that I now sometimes get BFD errors, which are clearly due to corrupted
data structures:
BFD: Dwarf Error: found dwarf version '0', this reader only handles version 2
and 3 information.
BFD: Dwarf Error: found dwarf version '41', this reader only handles version 2
and 3 information.
BFD: Dwarf Error: found dwarf version '3073', this reader only handles version
2 and 3 information.
Here are the first few stack frames when this error is first triggered:
#0 parse_comp_unit (stash=0x61b150, unit_length=146079746,
info_ptr_unit=0x62a27d "\002", offset_size=4) at ./dwarf2.c:2180
unit = 0x7ffff659be60
version = 0
abbrev_offset = 2687240
addr_size = 0
abbrevs = 0x7ffff62bb3b7
abbrev_number = 0
bytes_read = 32767
i = 0
abbrev = 0x7fffffffd228
attr = {
name = 4152623808,
form = 32767,
u = {
str = 0x7ffff630e42d
"\205\300\220x6H\211\330H\213l$\bH\213\034$L\213d$\020H\203\304\030\303\017\037\204",
blk = 0x7ffff630e42d,
val = 140737323787309,
sval = 140737323787309
}
}
info_ptr = 0x62a288 ""
end_ptr = 0x917a283 <Address 0x917a283 out of bounds>
amt = 4095
low_pc = 0
high_pc = 0
abfd = 0x609660
#1 0x00007ffff7885c6c in find_line (abfd=0x609660, section=0x617980,
offset=995, symbol=0x0, symbols=0x60a7a0, filename_ptr=0x7fffffffd498,
functionname_ptr=0x7fffffffd4a0, linenumber_ptr=0x7fffffffd4a8,
addr_size=4, pinfo=0x609bb0) at ./dwarf2.c:3258
length = 146079746
offset_size = 4
info_ptr_unit = 0x62a27d "\002"
stash = 0x61b150
addr = 4207043
each = 0x0
found = 0
do_line = 0
__PRETTY_FUNCTION__ = "find_line"
#2 0x00007ffff7885ef7 in _bfd_dwarf2_find_nearest_line (abfd=0x609660,
section=0x617980, symbols=0x60a7a0, offset=995,
filename_ptr=0x7fffffffd498, functionname_ptr=0x7fffffffd4a0,
linenumber_ptr=0x7fffffffd4a8, addr_size=0, pinfo=0x609bb0)
at ./dwarf2.c:3329
No locals.
#3 0x00007ffff789266a in _bfd_elf_find_nearest_line (abfd=0x609660,
section=0x617980, symbols=0x60a7a0, offset=995,
filename_ptr=0x7fffffffd498, functionname_ptr=0x7fffffffd4a0,
line_ptr=0x7fffffffd4a8) at elf.c:7254
found = <value optimized out>
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11302
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.