From 60f25dfd8c668f0b184302ae6b63b14a1482c631 Mon Sep 17 00:00:00 2001 From: Paul Pluzhnikov Date: Wed, 29 Jul 2009 23:10:05 +0000 Subject: [PATCH] 2009-07-29 Paul Pluzhnikov PR gdb/6817 * dbxread.c (read_dbx_symtab): Reduce stack use. --- gdb/ChangeLog | 5 +++++ gdb/dbxread.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1fcd4892764..b76d68a7d4a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-07-29 Paul Pluzhnikov + + PR gdb/6817 + * dbxread.c (read_dbx_symtab): Reduce stack use. + 2009-07-29 Jan Kratochvil Fix gcc-4.5 HEAD warnings. diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 37e9be7ef98..7cb016ddfed 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -1689,7 +1689,7 @@ pos %d"), sym_name = NULL; /* pacify "gcc -Werror" */ if (psymtab_language == language_cplus) { - char *new_name, *name = alloca (p - namestring + 1); + char *new_name, *name = xmalloc (p - namestring + 1); memcpy (name, namestring, p - namestring); name[p - namestring] = '\0'; new_name = cp_canonicalize_string (name); @@ -1700,6 +1700,7 @@ pos %d"), &objfile->objfile_obstack); xfree (new_name); } + xfree (name); } if (sym_len == 0) -- 2.30.2