public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/29144] New: abidiff does not report base class reordering
@ 2022-05-12 18:31 gprocida at google dot com
  2022-06-03 10:36 ` [Bug default/29144] " dodji at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gprocida at google dot com @ 2022-05-12 18:31 UTC (permalink / raw)
  To: libabigail

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

            Bug ID: 29144
           Summary: abidiff does not report base class reordering
           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 this issue when adding support for C++ classes in our own diff tool.

Consider these two source files:

struct A {
  int x;
};

struct B {
  int y;
};

struct C {
  int z;
};

struct D: A, B, C {
  int d;
};

D order;

and:

struct A {
  int x;
};

struct B {
  int y;
};

struct C {
  int z;
};

struct D: B, A, C {
  int d;
};

D order;

The only difference is in D's base class order.

This is an ABI break because the offsets of fields x and y in D are swapped
between the two versions of the code.

The generated XML reflects this correctly and abidiff detects the difference.
However, it does not say what the difference is:

Functions changes summary: 0 Removed, 0 Changed, 0 Added function
Variables changes summary: 0 Removed, 1 Changed, 0 Added variable

1 Changed variable:

  [C] 'D order' was changed at multiple_inheritance_order.1.cpp:17:1:
    type of variable changed:
      type size hasn't changed

and in leaf mode:

Leaf changes summary: 1 artifact changed
Changed leaf types summary: 1 leaf type 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 D at multiple_inheritance_order.0.cpp:13:1' changed:
  type size hasn't changed

Regards,
Giuliano.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-08 15:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 18:31 [Bug default/29144] New: abidiff does not report base class reordering gprocida at google dot com
2022-06-03 10:36 ` [Bug default/29144] " dodji at redhat dot com
2022-06-07 13:04 ` [Bug default/29144] New: " Dodji Seketeli
2022-06-07 13:04 ` [Bug default/29144] " dodji at seketeli dot org
2022-06-07 20:06 ` gprocida at google dot com
2022-06-08 15:39 ` dodji at redhat 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).