From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EBD4A385783A; Mon, 5 Apr 2021 14:21:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EBD4A385783A From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug corefiles/27689] FAIL: gdb.base/gcore-tls-pie.exp: x/i $pc Date: Mon, 05 Apr 2021 14:21:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: corefiles X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2021 14:21:34 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27689 --- Comment #2 from Tom de Vries --- Using this demonstrator patch, the warning is gone: ... diff --git a/bfd/elf.c b/bfd/elf.c index 276fa14c0dd..1d6c0d59e17 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -12150,6 +12150,12 @@ elf_parse_notes (bfd *abfd, char *buf, size_t size, file _ptr offset, Elf_External_Note *xnp =3D (Elf_External_Note *) p; Elf_Internal_Note in; + if (xnp->namesz[0] =3D=3D 0 && xnp->namesz[1] =3D=3D 0 && xnp->names= z[2] =3D=3D 0 + && xnp->namesz[3] =3D=3D 0) + { + p +=3D 4; + xnp =3D (Elf_External_Note *) p; + } if (offsetof (Elf_External_Note, name) > buf - p + size) return false; ... Likely not a fix though, given that the name size is actually allowed to be= 0.=20 Though the warning is gone, the FAIL is not. --=20 You are receiving this mail because: You are on the CC list for the bug.=