[binutils-gdb] PR 33455 SEGV in vfinfo at ldmisc.c:527

Alan Modra amodra@sourceware.org
Mon Nov 3 00:30:17 GMT 2025


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

commit f6b0f53a36820da91eadfa9f466c22f92e4256e0
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Nov 3 09:03:37 2025 +1030

    PR 33455 SEGV in vfinfo at ldmisc.c:527
    
    A reloc howto set up with EMPTY_HOWTO has a NULL name.  More than one
    place emitting diagnostics assumes a reloc howto won't have a NULL
    name.
    
            PR 33455
            * coffcode.h (coff_slurp_reloc_table): Don't allow a howto with
            a NULL name.

Diff:
---
 bfd/coffcode.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 1e5acc0032c..ce1e39131b4 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -5345,7 +5345,7 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols)
       RTYPE2HOWTO (cache_ptr, &dst);
 #endif	/* RELOC_PROCESSING */
 
-      if (cache_ptr->howto == NULL)
+      if (cache_ptr->howto == NULL || cache_ptr->howto->name == NULL)
 	{
 	  _bfd_error_handler
 	    /* xgettext:c-format */


More information about the Binutils-cvs mailing list