public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: "woodard at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/28641] unspecified indirect subtype changes.
Date: Mon, 06 Dec 2021 18:59:24 +0000	[thread overview]
Message-ID: <bug-28641-9487-040t7Uwnez@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28641-9487@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28641

--- Comment #4 from Ben Woodard <woodard at redhat dot com> ---
The only meaningful difference that I can see in one case is "const"

excerpt from the ABIXMLs:

GCC 

          <member-function access='public' const='yes' vtable-offset='6'>
            <function-decl name='has_changes'
mangled-name='_ZNK7abigail10comparison10array_diff11has_changesEv'
                filepath='../../../../Work/libabigail/src/abg-comparison.cc'
                line='3578' column='1' visibility='default' binding='global'
size-in-bits='64'
elf-symbol-id='_ZNK7abigail10comparison10array_diff11has_changesEv'>
              <parameter type-id='type-id-1051' is-artificial='yes'/>
              <return type-id='type-id-7'/>
            </function-decl>
          </member-function>

clang:
          <member-function access='public' vtable-offset='6'>
            <function-decl name='has_changes'
mangled-name='_ZNK7abigail10comparison10array_diff11has_changesEv'
               
filepath='/home/ben/Shared/test/libabigail-test/l5/../../../Work/libabigail/include/abg-comparison.h'
                line='1374' column='1' visibility='default' binding='global'
size-in-bits='64'
elf-symbol-id='_ZNK7abigail10comparison10array_diff11has_changesEv'>
              <parameter type-id='type-id-828' is-artificial='yes'/>
              <return type-id='type-id-2'/>
            </function-decl>
          </member-function>

Here is another example:

gcc:
          <member-function access='public' const='yes' vtable-offset='7'>
            <function-decl name='has_local_changes'
mangled-name='_ZNK7abigail10comparison14type_diff_base17has_local_changesEv'
               
filepath='/home/ben/Shared/test/libabigail-test/g5/../../../Work/libabigail/include/abg-comparison.h'
line='1080' column='1' visibility='default' binding='global' size-in-bits='64'>
              <parameter type-id='type-id-1232' is-artificial='yes'/>
              <return type-id='type-id-8859'/>
            </function-decl>
          </member-function>

clang:
          <member-function access='public' vtable-offset='7'>
            <function-decl name='has_local_changes'
mangled-name='_ZNK7abigail10comparison14type_diff_base17has_local_changesEv'
               
filepath='/home/ben/Shared/test/libabigail-test/l5/../../../Work/libabigail/include/abg-comparison.h'
line='1080' column='1' visibility='default' binding='global' size-in-bits='64'>
              <parameter type-id='type-id-1004' is-artificial='yes'/>
              <return type-id='type-id-8200'/>
            </function-decl>
          </member-function>

So arguably this is a clang bug in that it doesn't seem to record the
const-ness of the function in the DWARF (or we have a parsing bug where we
don't pick it up -- haven't checked that yet). 

I believe that we had a discussion a few years ago about whether const-ness of
a function actually amounted to an ABI difference. I can't recall the exact
ultimate decision on that point.

At the very least, when the difference between the two functions is "const"
then libabigail should print that out rather than emitting nothing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-12-06 18:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01 23:44 [Bug default/28641] New: " woodard at redhat dot com
2021-12-01 23:46 ` [Bug default/28641] " woodard at redhat dot com
2021-12-01 23:51 ` woodard at redhat dot com
2021-12-02  0:01 ` woodard at redhat dot com
2021-12-06 18:59 ` woodard at redhat dot com [this message]
2021-12-07  0:54 ` woodard at redhat dot com
2021-12-08 18:52 ` jwakely.gcc at gmail dot com
2021-12-08 18:54 ` woodard at redhat dot com
2021-12-08 19:36 ` woodard at redhat dot com
2021-12-08 20:27 ` woodard at redhat dot com
2021-12-08 23:38 ` gprocida at google dot com
2021-12-08 23:56 ` [Bug default/28641] const'ness of member functions is not detected in clang++ binaries woodard at redhat dot com
2021-12-09 11:18 ` gprocida at google dot com
2021-12-09 11:25 ` jwakely.gcc at gmail dot com
2021-12-09 11:32 ` jwakely.gcc at gmail dot com

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-28641-9487-040t7Uwnez@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).