From: "gprocida at google dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/29144] New: abidiff does not report base class reordering
Date: Thu, 12 May 2022 18:31:52 +0000 [thread overview]
Message-ID: <bug-29144-9487@http.sourceware.org/bugzilla/> (raw)
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.
next reply other threads:[~2022-05-12 18:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 18:31 gprocida at google dot com [this message]
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
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-29144-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).