Article View: gnu.gdb.bug
Article #10231gdb 3.3 core dumps after processing a COFF file without symbols +fix
From: Michael Bloom
Date: Sat, 04 Nov 1989 12:53
Date: Sat, 04 Nov 1989 12:53
30 lines
1660 bytes
1660 bytes
Symptom:
On COFF systems, gdb 3.? (2,3 certainly) drops core under varied
circumstances, at some point in time after looking for a
symbol table in an executable that lacks one..
Cause:
symbol-file-command in coffread.c adds cleanup records which include
a pointer to a pointer residing in it's own stack frame. When
this routine finds that there are no symbols, it returns to it's
caller, leaving those cleanups unprocessed. At some point in
the future they WILL be processed, but not before the pointer
(residing on the stack) get overwritten. When free_current_contents
is called from do_cleanups, indirecting through this pointer
kills gdb.
Fix:
Don't leave those cleanups hanging around after exiting the frame:
*** coffread.c.dist Wed Aug 23 09:31:55 1989
--- coffread.c Sat Nov 4 00:29:35 1989
***************
*** 749,754 ****
--- 749,755 ----
free_all_symtabs ();
printf ("%s does not have a symbol-table.\n", name);
fflush (stdout);
+ do_cleanups (old_chain);
return;
}
Technical Details
Message-ID:
<7428@ttidca.TTI.COM>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!samsung!usc!csun!srhqla!quad1!ttidca!mbShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5053,6cbace7a37480e2e,start X-Google-Attributes: gidf5053,public X-Google-ArrivalTime: 1989-11-03 17:01:49 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!samsung!usc!csun!srhqla!quad1!ttidca!mb From: mb@ttidca.TTI.COM (Michael Bloom) Newsgroups: gnu.gdb.bug Subject: gdb 3.3 core dumps after processing a COFF file without symbols +fix Message-ID: <7428@ttidca.TTI.COM> Date: 4 Nov 89 12:53:56 GMT Reply-To: mb@ttidca.tti.com (Michael Bloom) Organization: Citicorp/TTI, Santa Monica Lines: 30 Posted: Sat Nov 4 13:53:56 1989