* [Bug default/29441] New: name demangling should not be done on variable names
@ 2022-08-03 12:28 gprocida at google dot com
2022-08-03 12:39 ` [Bug default/29441] " gprocida at google dot com
2022-08-03 14:32 ` gprocida at google dot com
0 siblings, 2 replies; 3+ messages in thread
From: gprocida at google dot com @ 2022-08-03 12:28 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=29441
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:
<!-- void -->
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 attempt to
demangle C++ function linkage names and nothing else.
Giuliano.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug default/29441] name demangling should not be done on variable names
2022-08-03 12:28 [Bug default/29441] New: name demangling should not be done on variable names gprocida at google dot com
@ 2022-08-03 12:39 ` gprocida at google dot com
2022-08-03 14:32 ` gprocida at google dot com
1 sibling, 0 replies; 3+ messages in thread
From: gprocida at google dot com @ 2022-08-03 12:39 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=29441
--- Comment #1 from gprocida at google dot com ---
We've also found that this sometimes causes XML to be missing elf-symbol-id
links from var-decl to elf-symbol.
In a test case, changing a variable name from "x" (which demangles to "long
long") to "xx" (which is not a valid mangled name) fixed a missing link.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug default/29441] name demangling should not be done on variable names
2022-08-03 12:28 [Bug default/29441] New: name demangling should not be done on variable names gprocida at google dot com
2022-08-03 12:39 ` [Bug default/29441] " gprocida at google dot com
@ 2022-08-03 14:32 ` gprocida at google dot com
1 sibling, 0 replies; 3+ messages in thread
From: gprocida at google dot com @ 2022-08-03 14:32 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=29441
--- Comment #2 from gprocida at google dot com ---
Comment 2 is incorrect. We've been able to reproduce the second issue with pure
C and names that have no demangling. I'll open a separate bug.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-03 14:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03 12:28 [Bug default/29441] New: name demangling should not be done on variable names gprocida at google dot com
2022-08-03 12:39 ` [Bug default/29441] " gprocida at google dot com
2022-08-03 14:32 ` gprocida at google dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).