🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by ronys Wed, 28 Oct 1992 10:04
gdb 4.7: gdb internal error: Memory corruption
#13
Author: ronys
Date: Wed, 28 Oct 1992 10:04
119 lines
4827 bytes
Hi,

Thanks for writing and continuing to develop gdb!!!

I've just compiled version 4.7, and, as the subject line says, there's
a problem. Here's an exact description. I hope I haven't forgotten
anything:

Platform: Sun Sparcstation IPC running SunOS 4.1.2, 24M physical
memory.

Compiler & flags: cc -g. Problem also occurred with gcc -O (version
2.2.2. I started with this, then remade with cc -g to get a
traceback).
Ran configure with "sun4" as argument.

Bug scenario:
Trying to debug a large C++ program compiled with AT&T cfront 2.1:

Following is a transcript: Note lines marked <----. Comments at
bottom. Transcript slightly edited for legibility.

{10} pwd
{11} cd gdb
{12} ./gdb ./gdb
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.7, Copyright 1992 Free Software Foundation, Inc...
Setting up the environment for debugging gdb.
During symbol reading, bad block start address patched.  <---- ????? (1)
Breakpoint 1 at 0x3abb0: file utils.c, line 276.
Breakpoint 2 at 0x4a80: file main.c, line 1675.
(top-gdb) r ~/Work/bin/big_c++_program
Starting program: ~/tmp/g/gdb-4.7/gdb/gdb ~/Work/bin/big_c++_program
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.7, Copyright 1992 Free Software Foundation, Inc...
Setting up the environment for debugging gdb.
Breakpoint 1 at 0x43d78

gdb internal error: Memory corruption	<---- !!!!! (2)

Program received signal 3, Quit
0xf775c120 in kill ()
(top-gdb) bt
#0  0xf775c120 in kill ()
#1  0x3acdc in fatal_dump_core (__builtin_va_alist=1170832) at utils.c:306
#2  0x3b00c in malloc_botch () at utils.c:482
#3  0xf8a00 in checkhdr (mdp=0x152000, hdr=0x4d8000) at mmcheck.c:65
#4  0xf8a84 in mfree_check (md=0x0, 
    ptr=0x4d8008 "WIterator_____src_progstates_cc") at mmcheck.c:78
#5  0xf7ae8 in mfree (md=0x0, ptr=0x4d8008 "WIterator_____src_progstates_cc")
    at mfree.c:227
#6  0xf7b28 in free (ptr=0x4d8008 "WIterator_____src_progstates_cc")
    at mfree.c:246
#7  0x3ce30 in demangle_and_match (
    name=0x4d7619 "__vtbl__8ED_STATE_____src_prog_cc", 
    lookfor=0xf7fff750 "info_command", options=3) at utils.c:1439
During symbol reading, bad block start address patched.	    <---- !!!!!! (3)
#8  0x28d18 in lookup_symbol (name=0xf7fff750 "info_command", block=0x0, 
    namespace=VAR_NAMESPACE, is_a_field_of_this=0x0, symtab=0xf7fff78c)
    at symtab.c:570
#9  0x2bae8 in decode_line_1 (argptr=0xf7fff894, funfirstline=1, 
    default_symtab=0x0, default_line=0) at symtab.c:1831
#10 0x9f20 in break_command_1 (arg=0x165816 "", tempflag=0, from_tty=0)
    at breakpoint.c:1497
#11 0xa2ec in break_command (arg=0x16580a "info_command", from_tty=0)
    at breakpoint.c:1582
#12 0x3664 in execute_command (p=0x16580a "info_command", from_tty=0)
    at main.c:931
#13 0x38e4 in command_loop () at main.c:990
#14 0x25e8 in read_command_file (stream=0x13f314) at main.c:424
#15 0x5864 in source_command (args=0x1105c8 ".gdbinit", from_tty=0)
    at main.c:2059
#16 0x3278 in main (argc=2, argv=0xf7fffc0c) at main.c:817
(top-gdb) 


*** End of transcript

Notes:

(1) Never seen this on previous gdb versions. This on on the gdb
image! Note that this isn't printed when the inferior gdb reads the
image.

(2) Guess as to where crashed: .gdbinit has:
echo Setting up the environment for debugging gdb.\n

set complaints 1

b fatal

b info_command

It appears that the 'fatal' breakpoint is set, but 'info_command' is
not defined in my image.

(3) Again, what's this???

-----------------------------------------------------------------

Trying to reproduce the problem on a small program, I get the
following message when setting a breakpoint: This happens ONLY when
the test program is compiled with CC. It didn't occur when compiling
with g++:

(gdb) b main
During symbol reading, debug info mismatch between compiler and debugger.
Breakpoint 1 at 0x22b4: file /tmp/crash.C, line 2.


Hope this helps,

			Rony Shapiro

	ronys%robcad@uunet.uu.net OR  uunet!robcad!ronys
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads