https://bugzilla.novell.com/show_bug.cgi?id=439457 Summary: gdb: Segmentation fault at dwarf2read.c:7012 Product: openSUSE 11.1 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Critical Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: jblunck@novell.com QAContact: qa@suse.de CC: matz@novell.com, schwab@novell.com Found By: Development The latest Factory gdb is crashing when reading some debuginfo files. Since it is also crashing on its own debuginfo, I tried to debug this with the gdb from 11.0 which also segfaults. I suspect the debuginfo is bad: (gdb) file gdb Reading symbols from /mounts/users-space/jblunck/tmp/gdb.16484/gdb...Reading symbols from /mounts/users-space/jblunck/tmp/gdb.16484/gdb.debug... Program received signal SIGSEGV, Segmentation fault. dwarf_decode_lines (lh=0xb61690, comp_dir=0x0, abfd=0xb04dd0, cu=0x7ffff0cf79f0, pst=0xd02c60) at dwarf2read.c:7012 7012 if (fe->dir_index) (gdb) print fe $1 = (struct file_entry *) 0x2000aedb30 (gdb) print *fe Cannot access memory at address 0x2000aedb30 (gdb) print lh $2 = (struct line_header *) 0xb61690 (gdb) print *lh $3 = {total_length = 1009, version = 2, header_length = 351, minimum_instruction_length = 1 '\001', default_is_stmt = 1 '\001', line_base = -5, line_range = 14 '\016', opcode_base = 13 '\r', standard_opcode_lengths = 0xb61710 "\001", num_include_dirs = 6, include_dirs_size = 8, include_dirs = 0xae4a50, num_file_names = 19, file_names_size = 32, file_names = 0xaedb50, statement_program_start = 0x7f3be70be31a "", statement_program_end = 0x7f3be70be5b1 "�004"} (gdb) print file $4 = 0 (gdb) list 7007 if (lh->num_file_names < file) 7008 dwarf2_debug_line_missing_file_complaint (); 7009 else 7010 { 7011 fe = &lh->file_names[file - 1]; 7012 if (fe->dir_index) 7013 dir = lh->include_dirs[fe->dir_index - 1]; 7014 if (!decode_for_pst_p) 7015 { 7016 last_subfile = current_subfile; (gdb) So somehow it looks like there must be an DW_LNS_set_file that results in the file = 0 in the debuginfo. Although readelf output says: jblunck@e179:/suse/jblunck/tmp/gdb.16484$ readelf -wl gdb.debug | grep "Set File Name" | sort | uniq Set File Name to entry 10 in the File Name Table Set File Name to entry 11 in the File Name Table Set File Name to entry 12 in the File Name Table Set File Name to entry 13 in the File Name Table Set File Name to entry 14 in the File Name Table Set File Name to entry 15 in the File Name Table Set File Name to entry 16 in the File Name Table Set File Name to entry 17 in the File Name Table Set File Name to entry 18 in the File Name Table Set File Name to entry 19 in the File Name Table Set File Name to entry 1 in the File Name Table Set File Name to entry 20 in the File Name Table Set File Name to entry 2 in the File Name Table Set File Name to entry 3 in the File Name Table Set File Name to entry 4 in the File Name Table Set File Name to entry 5 in the File Name Table Set File Name to entry 6 in the File Name Table Set File Name to entry 7 in the File Name Table Set File Name to entry 8 in the File Name Table Set File Name to entry 9 in the File Name Table jblunck@e179:/suse/jblunck/tmp/gdb.16484$ So, I'm looking at the opcode that gdb just read: (gdb) print line_ptr $5 = (gdb_byte *) 0x7f3be70be5b4 "" (gdb) print bytes_read $6 = 1 (gdb) print line_ptr-bytes_read $7 = (gdb_byte *) 0x7f3be70be5b3 "" (gdb) print line_ptr-bytes_read-1 $8 = (gdb_byte *) 0x7f3be70be5b2 "\004" (gdb) print line_end $9 = (gdb_byte *) 0x7f3be70be5b1 "�004" (gdb) Ouch! gdb read over the end of the line program. This is due to the missing DW_LNE_end_sequence that gdb expects ... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.