From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Cc: quic_jiafan@quicinc.com
Subject: [PATCH, applied] Bug 31513 - Fix fallout of initial patch
Date: Wed, 03 Apr 2024 18:26:13 +0200 [thread overview]
Message-ID: <87edbmwgyi.fsf@redhat.com> (raw)
Hello,
As Jianfeng Fan pointed out in a comment at
https://sourceware.org/bugzilla/show_bug.cgi?id=31513#c14, there is a
thinko in commit
https://sourceware.org/git/?p=libabigail.git;a=commit;h=338394f5454990c715b52bb4bc2ed47b39d6528b.
has_subtype_changes forgets to reset the s_member when f_member is
reset. Both variables should be reset in tandem, just like what is
done in has_offset_changes.
Fixed thus.
* src/abg-comp-filter.cc (has_subtype_changes): Reset s_member in
the loop, just like f_member.
* tests/data/test-abidiff-exit/PR31513/non-regr/report1.txt: Adjust.
* tests/data/test-abidiff-exit/PR31513/non-regr/report2.txt: Adjust.
* tests/test-abidiff-exit.cc (in_out_specs): Adjust.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master.
---
src/abg-comp-filter.cc | 2 +-
.../test-abidiff-exit/PR31513/non-regr/report1.txt | 11 +----------
.../test-abidiff-exit/PR31513/non-regr/report2.txt | 11 +----------
tests/test-abidiff-exit.cc | 4 ++--
4 files changed, 5 insertions(+), 23 deletions(-)
diff --git a/src/abg-comp-filter.cc b/src/abg-comp-filter.cc
index caea9d0c..2156fad0 100644
--- a/src/abg-comp-filter.cc
+++ b/src/abg-comp-filter.cc
@@ -331,12 +331,12 @@ has_subtype_changes(const string_decl_base_sptr_map& f_data_members,
diff_context_sptr ctxt)
{
// Now compare the offsets of the data members collected.
- var_decl_sptr s_member;
for (auto entry : f_data_members)
{
var_decl_sptr f_member = is_var_decl(entry.second);
ABG_ASSERT(f_member);
+ var_decl_sptr s_member;
auto i = s_data_members.find(entry.first);
if (i == s_data_members.end())
{
diff --git a/tests/data/test-abidiff-exit/PR31513/non-regr/report1.txt b/tests/data/test-abidiff-exit/PR31513/non-regr/report1.txt
index dff216f8..9666a8fd 100644
--- a/tests/data/test-abidiff-exit/PR31513/non-regr/report1.txt
+++ b/tests/data/test-abidiff-exit/PR31513/non-regr/report1.txt
@@ -1,12 +1,3 @@
-Functions changes summary: 0 Removed, 1 Changed, 0 Added function
+Functions changes summary: 0 Removed, 0 Changed (1 filtered out), 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
-1 function with some indirect sub-type change:
-
- [C] 'function int foo(type&)' at test1-v0.cc:10:1 has some indirect sub-type changes:
- parameter 1 of type 'type&' has sub-type changes:
- in referenced type 'struct type' at test1-v1.cc:8:1:
- type size hasn't changed
- 1 base class insertion:
- struct base at test1-v1.cc:2:1
-
diff --git a/tests/data/test-abidiff-exit/PR31513/non-regr/report2.txt b/tests/data/test-abidiff-exit/PR31513/non-regr/report2.txt
index 25d39e9b..9666a8fd 100644
--- a/tests/data/test-abidiff-exit/PR31513/non-regr/report2.txt
+++ b/tests/data/test-abidiff-exit/PR31513/non-regr/report2.txt
@@ -1,12 +1,3 @@
-Functions changes summary: 0 Removed, 1 Changed, 0 Added function
+Functions changes summary: 0 Removed, 0 Changed (1 filtered out), 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
-1 function with some indirect sub-type change:
-
- [C] 'function int foo(type&)' at test2-v0.cc:10:1 has some indirect sub-type changes:
- parameter 1 of type 'type&' has sub-type changes:
- in referenced type 'struct type' at test2-v1.cc:9:1:
- type size hasn't changed
- 1 base class insertion:
- struct base at test2-v1.cc:2:1
-
diff --git a/tests/test-abidiff-exit.cc b/tests/test-abidiff-exit.cc
index 104d0580..29df74ff 100644
--- a/tests/test-abidiff-exit.cc
+++ b/tests/test-abidiff-exit.cc
@@ -1331,7 +1331,7 @@ InOutSpec in_out_specs[] =
"",
"",
"--no-default-suppression",
- abigail::tools_utils::ABIDIFF_ABI_CHANGE,
+ abigail::tools_utils::ABIDIFF_OK,
"data/test-abidiff-exit/PR31513/non-regr/report1.txt",
"output/test-abidiff-exit/PR31513/non-regr/report1.txt"
},
@@ -1346,7 +1346,7 @@ InOutSpec in_out_specs[] =
"",
"",
"--no-default-suppression",
- abigail::tools_utils::ABIDIFF_ABI_CHANGE,
+ abigail::tools_utils::ABIDIFF_OK,
"data/test-abidiff-exit/PR31513/non-regr/report2.txt",
"output/test-abidiff-exit/PR31513/non-regr/report2.txt"
},
--
2.39.3
--
Dodji
reply other threads:[~2024-04-03 16:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87edbmwgyi.fsf@redhat.com \
--to=dodji@redhat.com \
--cc=libabigail@sourceware.org \
--cc=quic_jiafan@quicinc.com \
/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).