public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: "dodji at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/26135] Wrong linkage name causes anonymous classes miscomparison
Date: Thu, 17 Sep 2020 14:17:07 +0000	[thread overview]
Message-ID: <bug-26135-9487-o5Pl5mk4W7@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26135-9487@http.sourceware.org/bugzilla/>

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.

      parent reply	other threads:[~2020-09-17 14:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18 16:48 [Bug default/26135] New: Possible issue with type equality gprocida+abigail at google dot com
2020-06-24 16:18 ` [Bug default/26135] " dodji at redhat dot com
2020-06-24 17:17 ` [Bug default/26135] Wrong linkage name causes anonymous classes miscomparison dodji at redhat dot com
2020-06-24 17:22 ` dodji at redhat dot com
2020-06-24 17:22 ` dodji at redhat dot com
2020-06-25 14:56 ` gprocida+abigail at google dot com
2020-07-06 17:14 ` dodji at redhat dot com
2020-07-16 11:41 ` gprocida+abigail at google dot com
2020-07-16 18:32 ` gprocida+abigail at google dot com
2020-09-17 14:17 ` dodji at redhat dot com [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-26135-9487-o5Pl5mk4W7@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=libabigail@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).