From: Than McIntosh Date: Sun, 25 Jan 2026 14:19:10 +0000 (+0000) Subject: PR 33835 readelf incorrect handling of DWARF5 CU DIE addr_base attribute X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a72b83ab3792532b66cc5c472a20476a8a2fd969;p=thirdparty%2Fbinutils-gdb.git PR 33835 readelf incorrect handling of DWARF5 CU DIE addr_base attribute Users of "readelf" report problems running the tool's DWARF dump flag on binaries built with the most recent version of the Go compiler (1.25), Go bug report here https://github.com/golang/go/issues/77246 dwarf.c (skip_attribute ): Skip terminating NUL too. --- diff --git a/binutils/dwarf.c b/binutils/dwarf.c index b5e9917b5fc..a9cb88d5631 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -3745,7 +3745,7 @@ skip_attribute (unsigned long form, dwarf_version); case DW_FORM_string: - inc = strnlen ((char *) data, end - data); + inc = strnlen ((char *) data, end - data) + 1; break; case DW_FORM_block: case DW_FORM_exprloc: