diff options
author | Michael Chastain <mec@google.com> | 2004-06-01 22:39:23 +0000 |
---|---|---|
committer | Michael Chastain <mec@google.com> | 2004-06-01 22:39:23 +0000 |
commit | d4687fa094995ebeaaee6deb5b59b198af37fdeb (patch) | |
tree | 8761cf75290f220aa157f850edaa467b06101e60 /gdb | |
parent | 0451f5dff4b594c0c6e5f6d0b65cfaecf32cdc22 (diff) | |
download | gdb-d4687fa094995ebeaaee6deb5b59b198af37fdeb.zip gdb-d4687fa094995ebeaaee6deb5b59b198af37fdeb.tar.gz gdb-d4687fa094995ebeaaee6deb5b59b198af37fdeb.tar.bz2 |
2004-06-01 Michael Chastain <mec.gnu@mindspring.com>
Fix PR symtab/1661.
* hpread.c (hpread_pxdb_needed): Call memset after alloca.
(hpread_read_struct_type): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/hpread.c | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fc67b2e..785dd9b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2004-06-01 Michael Chastain <mec.gnu@mindspring.com> + + Fix PR symtab/1661. + * hpread.c (hpread_pxdb_needed): Call memset after alloca. + (hpread_read_struct_type): Likewise. + 2004-06-01 Andrew Cagney <cagney@gnu.org> * mi/mi-cmd-env.c (env_execute_cli_command): Use xstrprintf diff --git a/gdb/hpread.c b/gdb/hpread.c index b3742d0..0701473 100644 --- a/gdb/hpread.c +++ b/gdb/hpread.c @@ -383,6 +383,7 @@ hpread_pxdb_needed (bfd *sym_bfd) if (header_section_size == (bfd_size_type) sizeof (DOC_info_PXDB_header)) { buf = alloca (sizeof (DOC_info_PXDB_header)); + memset (buf, 0, sizeof (DOC_info_PXDB_header)); if (!bfd_get_section_contents (sym_bfd, header_section, @@ -450,6 +451,7 @@ hpread_pxdb_needed (bfd *sym_bfd) { buf = alloca (sizeof (PXDB_header)); + memset (buf, 0, sizeof (PXDB_header)); if (!bfd_get_section_contents (sym_bfd, header_section, buf, 0, @@ -3686,6 +3688,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, /* Get space to record the next field/data-member. */ new = (struct nextfield *) alloca (sizeof (struct nextfield)); + memset (new, 0, sizeof (struct nextfield)); new->next = list; list = new; @@ -3764,6 +3767,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, n_templ_args++; /* Allocate and fill in a struct next_template */ t_new = (struct next_template *) alloca (sizeof (struct next_template)); + memset (t_new, 0, sizeof (struct next_template)); t_new->next = t_list; t_list = t_new; t_list->arg.name = VT (objfile) + fieldp->dtempl_arg.name; @@ -3904,6 +3908,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, /* Get space to record this member function */ /* Note: alloca used; this will disappear on routine exit */ fn_new = (struct next_fn_field *) alloca (sizeof (struct next_fn_field)); + memset (fn_new, 0, sizeof (struct next_fn_field)); fn_new->next = fn_list; fn_list = fn_new; @@ -4021,6 +4026,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, /* Get space to record this static member */ new = (struct nextfield *) alloca (sizeof (struct nextfield)); + memset (new, 0, sizeof (struct nextfield)); new->next = list; list = new; @@ -4051,6 +4057,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, warning ("Debug info inconsistent: FIELD of anonymous union doesn't have a_union bit set"); /* Get space to record the next field/data-member. */ new = (struct nextfield *) alloca (sizeof (struct nextfield)); + memset (new, 0, sizeof (struct nextfield)); new->next = list; list = new; @@ -4082,6 +4089,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, warning ("Debug info inconsistent: SVAR field in anonymous union doesn't have a_union bit set"); /* Get space to record the next field/data-member. */ new = (struct nextfield *) alloca (sizeof (struct nextfield)); + memset (new, 0, sizeof (struct nextfield)); new->next = list; list = new; @@ -4102,6 +4110,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, warning ("Debug info inconsistent: DVAR field in anonymous union doesn't have a_union bit set"); /* Get space to record the next field/data-member. */ new = (struct nextfield *) alloca (sizeof (struct nextfield)); + memset (new, 0, sizeof (struct nextfield)); new->next = list; list = new; @@ -4150,6 +4159,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, /* Get space to record the next field/data-member. */ new = (struct nextfield *) alloca (sizeof (struct nextfield)); + memset (new, 0, sizeof (struct nextfield)); new->next = list; list = new; @@ -4233,6 +4243,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, break; i_new = (struct next_instantiation *) alloca (sizeof (struct next_instantiation)); + memset (i_new, 0, sizeof (struct next_instantiation)); i_new->next = i_list; i_list = i_new; i_list->t = hpread_type_lookup (field, objfile); |