From: Dodji Seketeli <dodji@redhat.com>
To: Dodji Seketeli <dodji@redhat.com>
Cc: John Moon <quic_johmoo@quicinc.com>, <libabigail@sourceware.org>
Subject: Re: [PATCH] suppression: Add "has_strict_flexible_array_data_member_conversion" property
Date: Wed, 15 Nov 2023 11:46:01 +0100 [thread overview]
Message-ID: <871qcr8fbq.fsf@seketeli.org> (raw)
In-Reply-To: <8734xh3j1o.fsf@seketeli.org> (Dodji Seketeli's message of "Tue, 07 Nov 2023 12:21:55 +0100")
Hello,
"quic_johmoo at quicinc dot com" <sourceware-bugzilla@sourceware.org> a
écrit:
> https://sourceware.org/bugzilla/show_bug.cgi?id=31017
>
> --- Comment #6 from John Moon <quic_johmoo at quicinc dot com> ---
> Thanks for pushing it across the finish line! I just tested it and seems to be
> working correctly for me. 👍
Thanks, so I have applied the patch below to the master branch of the
git repository. I should be available in the upcoming libabigail 2.5
release.
Meanwhile, I am updating the libabigail 2.4 packages in the Fedora Linux
distribution to make them carry this patch as well as another one that
fixes https://sourceware.org/bugzilla/show_bug.cgi?id=31045.
That way, Fedora users should soon (before libabigail 2.5) be able to
use check-uapi.sh with all the relevant changes in libabigail.
Note that the patches I am pushing to the Fedora distribution are all in
the libabigail-2.4-branch of the git repository that can be browsed at
https://sourceware.org/git/?p=libabigail.git;a=shortlog;h=refs/heads/libabigail-2.4-branch.
Other distributions are of course encouraged to update their libabigail
2.4 package to add the patches that are in that branch.
Dodji Seketeli <dodji@redhat.com> a écrit:
[...]
> From fe1dbee8e8c5211c910d9b72fccd1230600be4ab Mon Sep 17 00:00:00 2001
> From: Dodji Seketeli <dodji@redhat.com>
> Date: Fri, 3 Nov 2023 17:47:57 -0700
> Subject: [PATCH] suppression: Add "has_strict_flexible_array_data_member_conversion" property
>
> In the past, it was common to have a "fake flex array" at the end of a
> structure. Like this:
>
> Nowadays, with improved compiler support, it's more common to use a real
> flex array. As this is a common change which changes ABI representation
> in a compatible way, we should have a suppression for it.
>
> For example, if you have a change like this:
>
> struct foo {
> int x;
> int flex[1];
> };
>
> ...
>
> struct foo {
> int x;
> int flex[];
> };
>
> abidiff reports:
>
> [C] 'struct foo' changed:
> type size changed from 64 to 32 (in bits)
> 1 data member change:
> type of 'int flex[1]' changed:
> type name changed from 'int[1]' to 'int[]'
> array type size changed from 32 to 'unknown'
> array type subrange 1 changed length from 1 to 'unknown'
>
> With a new has_strict_flexible_array_data_member_conversion property,
> users can specify a suppression which stops abidiff from emitting
> this diff for any "fake" flex arrays being converted to real ones:
>
> [suppress_type]
> type_kind = struct
> has_size_change = true
> has_strict_flexible_array_data_member_conversion = true
>
> * include/abg-comp-filter.h (has_strict_fam_conversion): Declare
> new functions.
> * include/abg-fwd.h
> (ir::has_fake_flexible_array_data_member): Declare new accessor
> functions.
> * include/abg-suppression.h
> (type_suppression::{,set_}has_strict_fam_conversion): Declare new
> accessor functions.
> * src/abg-comp-filter.cc (has_strict_fam_conversion): Define new
> functions.
> * src/abg-ir.cc
> (ir::has_fake_flexible_array_data_member): Define new accessor
> functions.
> * src/abg-suppression-priv.h
> (type_suppression::priv::has_strict_fam_conv_): Define new
> data member.
> * src/abg-suppression.cc
> (type_suppression::{,set_}has_strict_fam_conversion): Define new
> accessor functions.
> (type_suppression::suppresses_diff): For a type suppression to
> match a fake flex array conversion, either the size of the type
> hasn't change or has_size_change must be true and then the type
> must change from a fake flex array to a real flex array.
> (read_type_suppression): Parse the new
> 'has_strict_flexible_array_data_member_conversion' property to
> set the type_suppression::set_has_strict_fam_conversion property.
> * doc/manuals/libabigail-concepts.rst: Add an entry for the new
> 'has_strict_flexible_array_data_member_conversion' property.
> * tests/data/test-diff-suppr/test-has-strict-flexible-array-data-member-conversion-{1,2}.suppr:
> Add new test suppression files.
> * tests/data/test-diff-suppr/test-has-strict-flexible-array-data-member-conversion-report-{1,2}.txt:
> Add new test reference output files.
> * tests/data/test-diff-suppr/test-has-strict-flexible-array-data-member-conversion-v{0,1}.c:
> Add source code for new binary test input files.
> * tests/data/test-diff-suppr/test-has-strict-flexible-array-data-member-conversion-v{0,1}.o:
> Add new binary test input files.
> * tests/data/Makefile.am: Add the new test files to the source
> distribution.
> * tests/test-diff-suppr.cc (in_out_specs): Add the new test input
> files to this test harness.
>
> Signed-off-by: Dodji Seketeli <dodji@redhat.com>
> Signed-off-by: John Moon <quic_johmoo@quicinc.com>
[...]
Cheers,
--
Dodji
prev parent reply other threads:[~2023-11-15 10:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-04 0:47 John Moon
2023-11-07 11:21 ` Dodji Seketeli
2023-11-15 10:46 ` Dodji Seketeli [this message]
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=871qcr8fbq.fsf@seketeli.org \
--to=dodji@redhat.com \
--cc=libabigail@sourceware.org \
--cc=quic_johmoo@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).