From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 366B4385801D; Fri, 5 Jan 2024 12:50:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 366B4385801D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1704459006; bh=MkB+NgNsLuf78ToZh1/TWJKtdIKs4sQdUlEBp5WKqjY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=exgW/plaDhwjCmvAsSmpMF5ZEXan0TsFOAa53RjNCg+AI4MiMSe4VVhynTeeLXtGG LiytAbNQiLXhcy6P4wZ5bEfx3H2nF5B6vufxSHpttNUVfZ480ANy5RIHTqZt87PIim AuM3KukV9h9i8hu6knhRGeYKJDV9EJuBk84C6mDY= From: "ssbssa at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/25663] dwarf2_name caching bug Date: Fri, 05 Jan 2024 12:50:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ssbssa at sourceware dot org X-Bugzilla-Status: UNCONFIRMED 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: cc 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D25663 Hannes Domani changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ssbssa at sourceware dot o= rg --- Comment #11 from Hannes Domani --- (In reply to Sourceware Commits from comment #10) > The master branch has been updated by Tom Tromey : >=20 > https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git; > h=3D67430cd00afcc270a27e44b10f9ef4249d554e66 >=20 > commit 67430cd00afcc270a27e44b10f9ef4249d554e66 > Author: Tom Tromey > Date: Mon Mar 16 15:00:52 2020 -0600 >=20 > Fix dwarf2_name caching bug >=20=20=20=20=20 > PR gdb/25663 points out that dwarf2_name will cache a value in the > bcache and then return a substring. However, this substring return is > only done on the branch that caches the value -- so if the function is > called twice with the same arguments, it will return different values. >=20=20=20=20=20 > This patch fixes this problem. >=20=20=20=20=20 > This area is strange. We cache the entire demangled string, but only > return the suffix. I looked at caching just the suffix, but it turns > out that anonymous_struct_prefix assumes that the entire string is > stored. Also weird is that this code is demangling the linkage name > and then storing the demangled form back into the linkage name > attribute -- that seems bad, because what if some code wants to find > the actual linkage name? >=20=20=20=20=20 > Fixing these issues was non-trivial, though; and in the meantime this > patch seems like an improvement. Regression tested on x86-64 > Fedora 30. >=20=20=20=20=20 > gdb/ChangeLog > 2020-03-16 Tom Tromey >=20=20=20=20=20 > PR gdb/25663: > * dwarf2/read.c (dwarf2_name): Strip leading namespaces after > putting value into bcache. Can this be closed? --=20 You are receiving this mail because: You are on the CC list for the bug.=