[Bug default/26135] Wrong linkage name causes anonymous classes miscomparison
dodji at redhat dot com
sourceware-bugzilla@sourceware.org
Thu Sep 17 14:17:07 GMT 2020
https://sourceware.org/bugzilla/show_bug.cgi?id=26135
dodji at redhat dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|REOPENED |RESOLVED
--- Comment #6 from dodji at redhat dot com ---
(In reply to Giuliano Procida from comment #4)
> Hi Dodji.
>
> I was looking at type ids in another context and noticed the following.
>
> $ git grep -c " id='type-id-24'"
> 346e88dd~1:tests/data/test-read-dwarf/PR22122-libftdc.so.abi
> 346e88dd~1:tests/data/test-read-dwarf/PR22122-libftdc.so.abi:138
> $ git grep -c " id='type-id-24'"
> 346e88dd:tests/data/test-read-dwarf/PR22122-libftdc.so.abi
> 346e88dd:tests/data/test-read-dwarf/PR22122-libftdc.so.abi:708
>
> While 138 declaration-only anonymous types sharing the same id (and so I
> imagine the same canonical type) looks suspicious, 708 doing so is
> presumably worse.
I looked into this and it appears that the type with the ID "type-id-24" is an
anonymous class with no data member, no base classes, and which only contains
non-virtual member functions and/or some member type.
For classes containing no virtual member functions, only base classes and data
member are taken into account for identity.
So this seems normal to me. Furthermore, as we've been increasing the
likelihood of recognizing two anonymous types as equivalent, I rather find this
particular increase in duplicated ids as positive.
> I'm sorry I didn't check the test files more carefully sooner.
Nah, I think you've done great spotting this. This could have been a real
issue.
Incidentally, I have filed an enhancement request to detect pathological cases
of duplicated IDs at https://sourceware.org/bugzilla/show_bug.cgi?id=26591.
Thanks!
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Libabigail
mailing list