asan: coff-alpha use of uninitialised value

Alan Modra amodra@gmail.com
Mon Jan 19 06:03:00 GMT 2026


I think this is a false positive as the "use" is reported at a
_bfd_link_reloc_status_error call, and the value passed is not used
except when bfd_reloc_dangerous.  Avoid the warning anyway.

	* coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
	Avoid false positive warning.

diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c
index b57ca2b32f6..9e6325636ce 100644
--- a/bfd/coff-alpha.c
+++ b/bfd/coff-alpha.c
@@ -861,7 +861,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
     {
       arelent *rel;
       bfd_reloc_status_type r;
-      char *err;
+      char *err = NULL;
       unsigned int r_type;
 
       rel = *relp;

-- 
Alan Modra


More information about the Binutils mailing list