This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/172: crash on multiple set extension-language commands
- To: gdb-gnats at sources dot redhat dot com
- Subject: gdb/172: crash on multiple set extension-language commands
- From: bhelf at lads dot is dot lmco dot com
- Date: 9 Jul 2001 22:44:21 -0000
- Reply-To: bhelf at lads dot is dot lmco dot com
>Number: 172
>Category: gdb
>Synopsis: crash on multiple set extension-language commands
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jul 09 15:48:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Bill Helfinstine
>Release: 20010709 snapshot
>Organization:
>Environment:
Red Hat 6.2/i686
>Description:
When you do more than two set extension-language commands,
gdb crashes. This appears to be an incorrect size bug in
the xrealloc call in symfile.c, line 1796.
>How-To-Repeat:
prompt% gdb
GNU gdb 20010709 (MI_OUT)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or 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.
This GDB was configured as "i686-pc-linux-gnu".
(gdb) set extension-language .c c++
(gdb) set extension-language .fsm c++
(gdb) set extension-language .h c++
(gdb) set extension-language .hh c++
>Fix:
*** symfile.c Wed Jun 6 13:12:30 2001
--- symfile.c.new Mon Jul 9 18:17:47 2001
***************
*** 1794,1800 ****
{
fl_table_size += 10;
filename_language_table = xrealloc (filename_language_table,
! fl_table_size);
}
filename_language_table[fl_table_next].ext = xstrdup (ext);
--- 1794,1801 ----
{
fl_table_size += 10;
filename_language_table = xrealloc (filename_language_table,
! fl_table_size *
! sizeof (*filename_language_table));
}
filename_language_table[fl_table_next].ext = xstrdup (ext);
>Release-Note:
>Audit-Trail:
>Unformatted: