* dwarf2-info.c (yasm_dwarf2__generate_info): Fully initialize second debug_abbrev to avoid crash

on free.

svn path=/trunk/yasm/; revision=1383
0.5.0rc2
Peter Johnson 19 years ago
parent 141c786f67
commit 5e4df9b9e4
  1. 3
      modules/dbgfmts/dwarf2/dwarf2-info.c

@ -374,6 +374,9 @@ yasm_dwarf2__generate_info(yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2,
abbrev = yasm_xmalloc(sizeof(dwarf2_abbrev)); abbrev = yasm_xmalloc(sizeof(dwarf2_abbrev));
abc = yasm_bc_create_common(&dwarf2_abbrev_bc_callback, abbrev, 0); abc = yasm_bc_create_common(&dwarf2_abbrev_bc_callback, abbrev, 0);
abbrev->id = 0; abbrev->id = 0;
abbrev->tag = 0;
abbrev->has_children = 0;
STAILQ_INIT(&abbrev->attrs);
abc->len = 1; abc->len = 1;
yasm_dwarf2__append_bc(debug_abbrev, abc); yasm_dwarf2__append_bc(debug_abbrev, abc);

Loading…
Cancel
Save