From: Clément Chigot Date: Thu, 29 Jul 2021 11:14:47 +0000 (+0200) Subject: gas: ensure XCOFF DWARF subsection are initialized to 0 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f681e5867de63f1c8ca692023cf86e4c884fdae7;p=binutils-gdb.git gas: ensure XCOFF DWARF subsection are initialized to 0 debug_abbrev doesn't use end_exp to compute its size. However, it must be NULL. Otherwise, ppc_xcoff_end might try to access uninitialized memory. gas/ * config/tc-ppc.c (ppc_dwsect): Use XCNEW instead of XNEW when creating a new subsection. --- diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 8c3b0a8e7cc..1327eabf98d 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -4723,7 +4723,7 @@ ppc_dwsect (int ignore ATTRIBUTE_UNUSED) else { /* Create a new dw subsection. */ - subseg = XNEW (struct dw_subsection); + subseg = XCNEW (struct dw_subsection); if (opt_label == NULL) {