From patchwork Thu Sep 7 13:42:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 75453 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 E96F5385483B for ; Thu, 7 Sep 2023 13:42:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E96F5385483B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694094156; bh=uqctNE8qu+kFLu7uX9mURjx8gFpdESWpdRk/eJEf2Lc=; h=To:Cc:Subject:References:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Help:List-Subscribe:From: Reply-To:From; b=Lh7s/L1uGPEESbZMTYquFUWtPC7KwCfr7C0RdYM15UyI1/leWvKHTJDSWcj7pM0PC EmK4TOsDGv5BPCtufzQy/ZMZZWU8zPNTPwhzzVRm7zhuWenlvTWZ0GNxL5g3IGHxLl hILtzsNtVdOQL0aqK+mvvlxDWNiYqcsKfpWTAI8o= 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 [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id ACA6E385701C for ; Thu, 7 Sep 2023 13:42:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ACA6E385701C Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-522-9T390q2DO_C9w2qJfVy9iw-1; Thu, 07 Sep 2023 09:42:28 -0400 X-MC-Unique: 9T390q2DO_C9w2qJfVy9iw-1 Received: by mail-ot1-f70.google.com with SMTP id 46e09a7af769-6bdb30c45f6so934005a34.2 for ; Thu, 07 Sep 2023 06:42:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694094148; x=1694698948; h=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=uqctNE8qu+kFLu7uX9mURjx8gFpdESWpdRk/eJEf2Lc=; b=lieD0momQ9DLgy7ZrWWEPHlfbbJen9o1OMkJC0vX2hk7bvcN4H2rtsYbjx4Kj6o0vt eWTejkGNHCHfYEZ5QSUp1KjDRUQi9s0t+GDb2MUP5BGzWlcWJQ9W3q77URpZmcDCYSLA hCYhOHEGuAFS6Qz9bH9AwedbFclCZs6EBh7emihs8YC0v/cIknBjXLDNgmZXjcY/GilZ jvOToMfVHgnkVL2HvEZZhG9m4J2QqmnA8waPdOBQSETKyd4YHw0HBQp92RLpLjYF++Tp BSd6OJnGmemTGdsTjW9qaqxC6VhfsenIPiB5VEE2x/jEep+fKGGSBPaRt3pB8kK015ou 5ygg== X-Gm-Message-State: AOJu0Yz1/1tnwW17sRgzLzAS/9iXDEJ7uxBYylUXX3QiJNEKcyLiY9+n KtO+wYg1p8jOWfu8irYaruKVyS3u2jrOWs4mgYy0QfsL3snPEgjZYNyI6xZ4hsC9ehtJGRFKZ1w tyiFt8rW8rxW3lkc+yrmZQsth3yLJ X-Received: by 2002:a05:6830:457:b0:6bc:952a:1032 with SMTP id d23-20020a056830045700b006bc952a1032mr20545926otc.14.1694094147995; Thu, 07 Sep 2023 06:42:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFPX9sfnr+u81GJostGQyOq5RkOAnOBVuCC4vQ/e9YKJ2n3WcXhXI46MUuLu2DJ622s/36VqQ== X-Received: by 2002:a05:6830:457:b0:6bc:952a:1032 with SMTP id d23-20020a056830045700b006bc952a1032mr20545915otc.14.1694094147788; Thu, 07 Sep 2023 06:42:27 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id a27-20020a0ca99b000000b0064f50e2c551sm6418190qvb.1.2023.09.07.06.42.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:42:27 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id DF37AB4FD2; Thu, 7 Sep 2023 15:42:25 +0200 (CEST) To: Dodji Seketeli Cc: libabigail@sourceware.org Subject: [PATCH 09/16] ir: Add missing ABG_RETURN in the comparison engine Organization: Red Hat / France References: <87il8mglc1.fsf@redhat.com> X-Operating-System: CentOS Stream release 9 X-URL: http://www.redhat.com Date: Thu, 07 Sep 2023 15:42:25 +0200 In-Reply-To: <87il8mglc1.fsf@redhat.com> (Dodji Seketeli's message of "Thu, 07 Sep 2023 15:32:46 +0200") Message-ID: <87edjaf6bi.fsf@redhat.com> 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 X-Spam-Status: No, score=-11.9 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_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 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 structural type comparison, we want to be able to break on the first occurrence of two sub-types comparing different. This is done by setting a breakpoint into the notify_equality_failed function that is called by the ABG_RETURN macro in the comparison functions. The problem is that I stumbled upon some code paths that are missing the ABG_RETURN macro. Fixed thus. This will help in debugging sessions. * src/abg-ir.cc (equals): In the overload for function_type, class_decl and union_decl, add a missing ABG_RETURN. Signed-off-by: Dodji Seketeli Applied to master. --- src/abg-ir.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index b33d6d68..cb230082 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -20257,8 +20257,8 @@ equals(const function_type& l, const function_type& r, change_kind* k) // comparing them all over again. bool cached_result = false; if (l.get_environment().priv_->is_type_comparison_cached(l, r, - cached_result)) - return cached_result; + cached_result)) + ABG_RETURN(cached_result); } mark_types_as_being_compared(l, r); @@ -24251,7 +24251,7 @@ equals(const class_decl& l, const class_decl& r, change_kind* k) // over again. bool result = false; if (l.get_environment().priv_->is_type_comparison_cached(l, r, result)) - return result; + ABG_RETURN(result); } // if one of the classes is declaration-only then we take a fast @@ -25438,7 +25438,7 @@ equals(const union_decl& l, const union_decl& r, change_kind* k) // over again. bool result = false; if (l.get_environment().priv_->is_type_comparison_cached(l, r, result)) - return result; + ABG_RETURN(result); } bool result = equals(static_cast(l),