From patchwork Wed Sep 8 14:24:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 44909 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DF9473861881 for ; Wed, 8 Sep 2021 14:24:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF9473861881 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631111063; bh=ECPLSZaiOjE4BKE31GEJJE+MWnPO/1QchkXyh10bRFo=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:From; b=R0vg9810YXRspFuRHYbTwAAtxOVYuhF2tuIeo9eYlGYZHXycefhuGzc6QNU0vO0AN peiTOgbzwipuYaeA55wzgoWvXbsnqXbcIsdXSrEQaafVCmnpCunk8t7IBLJMHBMYha lRHMNKDGtq8UVpRiEcwTtfs446xN498SEvX5dr3E= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id C5D6D3858414 for ; Wed, 8 Sep 2021 14:24:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C5D6D3858414 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-413-KG2Kfr-WNDuE7PqgS3_uFg-1; Wed, 08 Sep 2021 10:24:18 -0400 X-MC-Unique: KG2Kfr-WNDuE7PqgS3_uFg-1 Received: by mail-wr1-f70.google.com with SMTP id h1-20020adffd41000000b0015931e17ccfso547507wrs.18 for ; Wed, 08 Sep 2021 07:24:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:organization:date:message-id :user-agent:mime-version; bh=ECPLSZaiOjE4BKE31GEJJE+MWnPO/1QchkXyh10bRFo=; b=RiYwuVMQU/9+9mMNcim2/+J5LxgE+BEQVCV16gOl+yDDDCKnxyirj93PDymp0vDmJU V4+in4MuzHKjfPYZ9yFrPdUa7iUGkPY5slfrEYC+z6tmOsKf+n+iLGnK6BdiSR3Ho0Sv Zh5qADkE93WbGS+ixisoxl4Uz+Tt6PTbJGWm82XpGVC71hSxC+P/f6xDWDN60B+n8Wv9 6ZyfmcA6fUq1tRM3Wkjl+dpgKxUzt73MT2N48aBvnvqjv1Rjahi6VgrgJumkGfqH5j00 ivQPRALIX9Mx4IXVagfmoJU47t0MnVlZ1vjnK8HHCUyqWyPLK2Ovkvr2btf6fNL/pLcl p3KQ== X-Gm-Message-State: AOAM5301m0N6VlStYudGRJNjv8SxE2HppBerV5Im030ups0wxHe4YsOI zJQsovzhJ1kWO5QinNLTNoQF4WHhIF7dHW9lTpfMEya8iG1wkHS+0CRPOpv9+6vomcy4/Ze8K9i QGxjdEuYjnzgAZw+klj9it11cV6Fktq+EWR5KQMdJ8miJgU4kMBm1KQjIy2kq6iZ15ydM X-Received: by 2002:a05:600c:35c4:: with SMTP id r4mr4062543wmq.194.1631111056773; Wed, 08 Sep 2021 07:24:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyai8eMQgi21OOogqvM99RFSOBQk6rhdsQp13wAoHRmHtMbjTS+6DC8VsePPK4lPa+oG2GRyQ== X-Received: by 2002:a05:600c:35c4:: with SMTP id r4mr4062518wmq.194.1631111056477; Wed, 08 Sep 2021 07:24:16 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id u13sm2375229wrg.68.2021.09.08.07.24.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 07:24:16 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id B8E3F58000E; Wed, 8 Sep 2021 16:24:15 +0200 (CEST) To: libabigail@sourceware.org Subject: [PATCH, applied] ir: Fix canonical type propagation cancelling Organization: Red Hat / France X-Operating-System: Fedora 36 X-URL: http://www.redhat.com Date: Wed, 08 Sep 2021 16:24:15 +0200 Message-ID: <87bl53f8mo.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: Dodji Seketeli via Libabigail From: Dodji Seketeli Reply-To: Dodji Seketeli Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" Hello, During the canonical type propagation optimization, when the comparison of two type sub-objects fails, we need to cancel the (potential) propagation of the canonical type of the current type sub-object being compared. We were not doing that in return_comparison_result, but were expecting it. Oops. Fixed thus. This helps to fix bug https://bugzilla.redhat.com/show_bug.cgi?id=1951501. * src/abg-ir.cc (return_comparison_result): When the comparison of the current type sub-object fails, clear the potentially propagated canonical type and remove it from the set of types with non confirmed propagated canonical types. Signed-off-by: Dodji Seketeli Applied to master. --- src/abg-ir.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index a12a6955..3ce49e76 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -1005,12 +1005,12 @@ return_comparison_result(T& l, T& r, bool value) { // The right-hand-side operand cannot carry any tentative // canonical type at this point. - type_base* canonical_type = r.get_naked_canonical_type(); - ABG_ASSERT(canonical_type == nullptr); + is_type(&r)->priv_->clear_propagated_canonical_type(); // Reset the marking of the right-hand-side operand as it no // longer carries a tentative canonical type that might be // later cancelled. is_type(&r)->priv_->set_does_not_depend_on_recursive_type(); + env->priv_->remove_from_types_with_non_confirmed_propagated_ct(&r); } } }