gdb 2002-04-01-cvs segfaults on core file

[email protected] (Gaël Le Mignot)
Newsgroups gmane.comp.gdb.bugs.general
Organization HurdFr - http://hurdfr.org
Message-ID <[email protected]>
I encountered a segfault of gdb 2002-04-01-cvs (Debian Sarge package) when
running it on a (huge) core file generated by a C++ program (compiled with
g++ 3.2).

Here is a trace of gdb running gdb:

(gael@pc137082, 16) ~/mkigen/run $ gdb gdb
[...]
(gdb) r ../apps/login/login core.19795
[...]
Core was generated by `/home/gael/mkigen/apps/login/login /home/gael/mkigen/orb.cfg'.
Program terminated with signal 11, Segmentation fault.
[...]
#0  0x40bcb094 in Player::save() (this=0x80c68e8) at player.cpp:2241
(gdb) p _graphical_attributes 
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x40112f01 in _IO_file_seekoff () from /lib/libc.so.6
(gdb) bt
#0  0x40112f01 in _IO_file_seekoff () from /lib/libc.so.6
#1  0x4010b8d3 in _IO_seekoff () from /lib/libc.so.6
#2  0x4010fbdb in fseek () from /lib/libc.so.6
#3  0x08139567 in bfd_seek ()
#4  0x0813992f in _bfd_generic_get_section_contents ()
#5  0x0813a8b4 in bfd_get_section_contents ()
#6  0x080bb9ef in xfer_memory ()
#7  0x080b6649 in do_xfer_memory ()
#8  0x080b676c in do_xfer_memory ()
#9  0x080b65ae in target_read_memory ()
#10 0x080bf401 in read_memory ()
#11 0x08078460 in value_fetch_lazy ()
#12 0x0807a215 in value_bitstring ()
#13 0x08077ddd in value_cast ()
#14 0x0811fec7 in gnuv3_baseclass_offset ()
#15 0x080d37be in baseclass_offset ()
#16 0x0807a233 in value_bitstring ()
#17 0x08077ddd in value_cast ()
#18 0x0811fec7 in gnuv3_baseclass_offset ()
#19 0x080d37be in baseclass_offset ()
#20 0x0807a233 in value_bitstring ()
#21 0x08077ddd in value_cast ()
#22 0x0811fec7 in gnuv3_baseclass_offset ()
#23 0x080d37be in baseclass_offset ()
#24 0x0807a233 in value_bitstring ()
#25 0x08077ddd in value_cast ()
#26 0x0811fec7 in gnuv3_baseclass_offset ()
[...]

player.cpp:2241 is:
                        _graphical_attributes->save();
with _graphical_attributes a member of the class player:
        PlayerGraphicalAttributes* _graphical_attributes;

hoping this can help you,

-- 
Gael Le Mignot "Kilobug" - [email protected] - http://kilobug.free.fr
GSM         : 06.71.47.18.22 (in France)   ICQ UIN   : 7299959
Fingerprint : 1F2C 9804 7505 79DF 95E6 7323 B66B F67B 7103 C5DA

Member of HurdFr: http://hurdfr.org - The GNU Hurd: http://hurd.gnu.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.