From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 14F223858D20 for ; Wed, 15 Nov 2023 10:46:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 14F223858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 14F223858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700045168; cv=none; b=vVV1Vrx2srOD3g+d15z/vjaf549lSryjYsSrG2ata7AFznYhzCdEuMdpfWLueOW7Sf1cGbEvaggeDmOFP+GqpETklZsHB99L+NCBdGCmGZe0YEyoYu9IhZ/66DeArXdyJ5/imJpbPt3bZLm9HBCh+bFj/c/8Z4BBQESRdJhZtOI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700045168; c=relaxed/simple; bh=ScN1LDu0nI9O29ZrM5R+CuXUhfjXG7Pra5CkLR6CDls=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=xfmA+dJiq6+sL4tLFYUZkixGaSUmAqti3ylm03uOBj1MMB1EVfFMlFpJZPnE4sJNC3MDhz+F5hsokiwz0eRZ4VcBaSz2KCnTw2W4FIkGleTacIggVtoqP8XAn71Ypl5jlmT5bcUrzEAcV0hnm+Mo20qWoKFaaxDAzgBt47nGLBU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700045166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LK/l7yhNa02sRWVY/krd5+7lzN4eWI+kPHGLRWII/Rs=; b=TNKcry9Ky9u4TcnPYCvYTGLiWNDqvz8ZzlvuFfnhOamueihehGkbFnYZLOm3mXtEJUDWj9 6fcncDSyhjsJFFglBnUS4eAguIAwtqGTPkEOyx2vkylBoSAZ3d89HNidKIaHYfpTkqmv26 vW7NaWZ2qXS2CtdXOk4lMKHtcTDVUPc= Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-492-zVR8HYbUNuiLrpjRGS6KMw-1; Wed, 15 Nov 2023 05:46:05 -0500 X-MC-Unique: zVR8HYbUNuiLrpjRGS6KMw-1 Received: by mail-vs1-f71.google.com with SMTP id ada2fe7eead31-45d8bfa7e8cso2209198137.2 for ; Wed, 15 Nov 2023 02:46:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700045165; x=1700649965; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:organization:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9KkrGoYLb49rphtxSTX0egpwutwPJYVn20YPS2Vx+hg=; b=bVaHaRh8F8mCfYG1kRylnyDhjF8mYzjTZPWe+AFzboCiPMMq8tD4AilJn08tVFqSXC xYEoyr8giOd5/yu7J7ca9vN1YKqOkgRLesEEca/e0Gl60lBJ6G50wZrw7Nxor0F8MCBI i1Usjt62j5Y/5o/J5lSu1Y4N1U0vWsuHGPpR+lIWaDw8tzVn4eqt+QXBJv9WIL92NoeG /YXRCXBZv7lOe9Nl18TDPCN2EzN93arn7NUXvP2ikDFFx5o+lRrx2hL/7IG1eOaCx9A6 CsfBvwEoeL2kBkO/u9vVFE2YcJBG8kkKEZoG1MRqIsBw1O/2KgdGk+djWrisTXevvb+R +a6Q== X-Gm-Message-State: AOJu0YyhH78ezDohYzTe9qKMI/1Bv86VSdB+u9MbgCwnc4qHAZ5YQz/r EQfCmxTyPY8j31koBEHZVVThlkGGTLe798kxF7fq3qMOgWqrVwU2x15Xs9c84twX1ea3H283kXJ BmNsF2uP24oaVwvVIVhlT X-Received: by 2002:a05:6102:3e1b:b0:45f:2a26:aa86 with SMTP id j27-20020a0561023e1b00b0045f2a26aa86mr13884072vsv.25.1700045164853; Wed, 15 Nov 2023 02:46:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2KV1FJ/frlr/4Hc5U5dEHvKJ8xjz/bB22bhnEmFcePHYjXih5rR+IVuoJz5t/uJ6OqSHqag== X-Received: by 2002:a05:6102:3e1b:b0:45f:2a26:aa86 with SMTP id j27-20020a0561023e1b00b0045f2a26aa86mr13884064vsv.25.1700045164619; Wed, 15 Nov 2023 02:46:04 -0800 (PST) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id rg8-20020a05620a8ec800b00765ab6d3e81sm3347696qkn.122.2023.11.15.02.46.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 02:46:03 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id 7D15A5079008; Wed, 15 Nov 2023 11:46:01 +0100 (CET) From: Dodji Seketeli To: Dodji Seketeli Cc: John Moon , Subject: Re: [PATCH] suppression: Add "has_strict_flexible_array_data_member_conversion" property Organization: Me, myself and I References: <20231104004757.21305-1-quic_johmoo@quicinc.com> <8734xh3j1o.fsf@seketeli.org> X-Operating-System: AlmaLinux 9.2 X-URL: http://www.seketeli.net/~dodji Date: Wed, 15 Nov 2023 11:46:01 +0100 In-Reply-To: <8734xh3j1o.fsf@seketeli.org> (Dodji Seketeli's message of "Tue, 07 Nov 2023 12:21:55 +0100") Message-ID: <871qcr8fbq.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello, "quic_johmoo at quicinc dot com" a =C3=A9crit: > https://sourceware.org/bugzilla/show_bug.cgi?id=3D31017 > > --- Comment #6 from John Moon --- > Thanks for pushing it across the finish line! I just tested it and seems = to be > working correctly for me. =F0=9F=91=8D 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=3D31045. 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=3Dlibabigail.git;a=3Dshortlog;h=3Drefs/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 a =C3=A9crit: [...] > From fe1dbee8e8c5211c910d9b72fccd1230600be4ab Mon Sep 17 00:00:00 2001 > From: Dodji Seketeli > 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 =3D struct > has_size_change =3D true > has_strict_flexible_array_data_member_conversion =3D true > > =09* include/abg-comp-filter.h (has_strict_fam_conversion): Declare > =09new functions. > =09* include/abg-fwd.h > =09(ir::has_fake_flexible_array_data_member): Declare new accessor > =09functions. > =09* include/abg-suppression.h > =09(type_suppression::{,set_}has_strict_fam_conversion): Declare new > =09accessor functions. > =09* src/abg-comp-filter.cc (has_strict_fam_conversion): Define new > =09functions. > =09* src/abg-ir.cc > =09(ir::has_fake_flexible_array_data_member): Define new accessor > =09functions. > =09* src/abg-suppression-priv.h > =09(type_suppression::priv::has_strict_fam_conv_): Define new > =09data member. > =09* src/abg-suppression.cc > =09(type_suppression::{,set_}has_strict_fam_conversion): Define new > =09accessor functions. > =09(type_suppression::suppresses_diff): For a type suppression to > =09match a fake flex array conversion, either the size of the type > =09hasn't change or has_size_change must be true and then the type > =09must change from a fake flex array to a real flex array. > =09(read_type_suppression): Parse the new > =09'has_strict_flexible_array_data_member_conversion' property to > =09set the type_suppression::set_has_strict_fam_conversion property. > =09* doc/manuals/libabigail-concepts.rst: Add an entry for the new > =09'has_strict_flexible_array_data_member_conversion' property. > =09* tests/data/test-diff-suppr/test-has-strict-flexible-array-data-membe= r-conversion-{1,2}.suppr: > =09Add new test suppression files. > =09* tests/data/test-diff-suppr/test-has-strict-flexible-array-data-membe= r-conversion-report-{1,2}.txt: > =09Add new test reference output files. > =09* tests/data/test-diff-suppr/test-has-strict-flexible-array-data-membe= r-conversion-v{0,1}.c: > =09Add source code for new binary test input files. > =09* tests/data/test-diff-suppr/test-has-strict-flexible-array-data-membe= r-conversion-v{0,1}.o: > =09Add new binary test input files. > =09* tests/data/Makefile.am: Add the new test files to the source > =09distribution. > =09* tests/test-diff-suppr.cc (in_out_specs): Add the new test input > =09files to this test harness. > > Signed-off-by: Dodji Seketeli > Signed-off-by: John Moon [...] Cheers, --=20 =09=09Dodji