public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: "gprocida+abigail at google dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/26998] New: abidiff --leaf-changes-only misreports array member changes
Date: Wed, 02 Dec 2020 17:10:40 +0000	[thread overview]
Message-ID: <bug-26998-9487@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 26998
           Summary: abidiff --leaf-changes-only misreports array member
                    changes
           Product: libabigail
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: gprocida+abigail at google dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

We've seen various cases where abidiff --leaf-changes-only reporting falls off
the bottom of the represent helper resulting in the message "<member> has
*some* difference - please report as a bug".

The problem manifests itself in two different ways. Sometime this message just
appears (and I speculate anonymous type renumbering has something to do with
it). At other times, it's clear that there is a type change but abidiff has
already reported it.

I took a hour or so to dig deeper into one of the latter instances.

Note that extracting ABIs with abidw and then comparing them yields the same
results.

$ head -100 *.c
==> test.0.c <==
struct buzz {
  int a;
};

struct flexible {
  long count;
  struct buzz lightyear[0];
};

void impacted(const struct flexible * flex) { (void) flex; }

==> test.1.c <==
struct buzz {
  long a;
};

struct flexible {
  long count;
  struct buzz lightyear[0];
};

void impacted(const struct flexible * flex) { (void) flex; }
$ for x in test.{0,1}.c; do gcc -Wall -Wextra -g -c $x; done
$ abidiff --impacted-interfaces --leaf-changes-only test.{0,1}.o
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 2 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'struct buzz at test.0.c:1:1' changed:
  type size changed from 32 to 64 (in bits)
  there are data member changes:
    type 'int' of 'buzz::a' changed:
      type name changed from 'int' to 'long int'
      type size changed from 32 to 64 (in bits)
  one impacted interface:
    function void impacted(const flexible*)

'struct flexible at test.0.c:5:1' changed:
  type size hasn't changed
  there are data member changes:
    'buzz flexible::lightyear[]' has *some* difference - please report as a bug
  one impacted interface:
    function void impacted(const flexible*)

Changing both array sizes from 0 to 1 results in actual (size) difference being
reported for struct flexible. However, this type should probably not be being
reported at all as it's not a leaf type (i.e., a changed type that is the root
cause of other changes).

I'll see if I can generate another test case where there's just a harmless
anonymous type rename and trigger the message that way as well.

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

             reply	other threads:[~2020-12-02 17:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02 17:10 gprocida+abigail at google dot com [this message]
2020-12-03 10:43 ` [Bug default/26998] " gprocida+abigail at google dot com
2020-12-03 12:45 ` gprocida+abigail at google 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-26998-9487@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).