From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6A345385840A; Wed, 3 Aug 2022 12:28:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A345385840A From: "gprocida at google dot com" To: libabigail@sourceware.org Subject: [Bug default/29441] New: name demangling should not be done on variable names Date: Wed, 03 Aug 2022 12:28:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gprocida at google dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dodji at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2022 12:28:33 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29441 Bug ID: 29441 Summary: name demangling should not be done on variable names Product: libabigail Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: default Assignee: dodji at redhat dot com Reporter: gprocida at google dot com CC: libabigail at sourceware dot org Target Milestone: --- Hi Dodji. We noticed some odd output with abidw --annotate. Simple C++ code like: struct A { int x; }; A v; results in the annotation for A: This is because "v" as a type demangles to "void". There is no way to turn = off this behaviour at the abi::__cxa_demangle level. The fix is to ensure that *only* mangled names are passed to the function. All callers to demangle_cplus_mangled_name are at risk of giving incorrect results, including compare_symbol_name which itself has a few callers. One issue is that symbol name is copied into linkage_name (if absent) so the presence of linkage_name cannot be used indicator of a name being mangled. If linkage_name cannot be relied on, then it may be possible to only attemp= t to demangle C++ function linkage names and nothing else. Giuliano. --=20 You are receiving this mail because: You are on the CC list for the bug.=