NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/59319: ld.elf_so: build broken with DEBUG, RTLD_DEBUG_RELOC



>Number:         59319
>Category:       lib
>Synopsis:       ld.elf_so: build broken with DEBUG, RTLD_DEBUG_RELOC
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 18 13:20:00 +0000 2025
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
The NetRTLD_DEBUG Symnumbering
>Environment:
>Description:
/home/riastradh/netbsd/current/src/libexec/ld.elf_so/arch/alpha/alpha_reloc.c: In function '_rtld_relocate_nonplt_objects':
/home/riastradh/netbsd/current/src/libexec/ld.elf_so/arch/alpha/alpha_reloc.c:335:54: error: 'symnum' may be used uninitialized [-Werror=maybe-uninitialized]
  335 |                             obj->strtab + obj->symtab[symnum].st_name));
      |                                                      ^
/home/riastradh/netbsd/current/src/libexec/ld.elf_so/arch/alpha/alpha_reloc.c:210:34: note: 'symnum' was declared here
  210 |                 unsigned long    symnum;
      |                                  ^~~~~~

>How-To-Repeat:
cd libexec/ld.elf_so
nbmake-alpha

Probably the same problem appears on other machines (e.g., libexec/ld.elf_so/arch/x86_64/mdreloc.c rev. 1.43).
>Fix:
Hoist initialization of symnum to be earlier.



Home | Main Index | Thread Index | Old Index