[binutils-gdb/binutils-2_38-branch] PR28826 x86_64 ld segfaults building xen

Alan Modra amodra@sourceware.org
Sat Feb 5 08:29:45 GMT 2022


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=61ecfbda44fb8d165f01cac3d704a5e9fd321795

commit 61ecfbda44fb8d165f01cac3d704a5e9fd321795
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Jan 28 14:29:34 2022 +1030

    PR28826 x86_64 ld segfaults building xen
    
    Fallout from commit e86fc4a5bc37
    
            PR 28826
            * coffgen.c (coff_write_alien_symbol): Init dummy to zeros.
    
    (cherry picked from commit 07c9f243b3a12cc6749bc02ee7b165859979348b)

Diff:
---
 bfd/coffgen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index 293fce2baf3..bec1a424831 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -1092,6 +1092,7 @@ coff_write_alien_symbol (bfd *abfd,
 	memset (isym, 0, sizeof (*isym));
       return true;
     }
+  memset (dummy, 0, sizeof dummy);
   native = dummy;
   native->is_sym = true;
   native[1].is_sym = false;


More information about the Binutils-cvs mailing list