public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@redhat.com>
To: Dodji Seketeli <dodji@redhat.com>
Cc: libabigail@sourceware.org
Subject: [PATCH 09/16] ir: Add missing ABG_RETURN in the comparison engine
Date: Thu, 07 Sep 2023 15:42:25 +0200	[thread overview]
Message-ID: <87edjaf6bi.fsf@redhat.com> (raw)
In-Reply-To: <87il8mglc1.fsf@redhat.com> (Dodji Seketeli's message of "Thu, 07 Sep 2023 15:32:46 +0200")

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 <dodji@redhat.com>
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<const class_or_union&>(l),
-- 
2.39.3



-- 
		Dodji


  parent reply	other threads:[~2023-09-07 13:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 13:32 [PATCH 00/16] Fixing various issues found while working on PR30309 Dodji Seketeli
2023-09-07 13:34 ` [PATCH 01/16] reader: fix indentation Dodji Seketeli
2023-09-07 13:35 ` [PATCH 02/16] tools-utils: Fix indentation Dodji Seketeli
2023-09-07 13:38 ` [PATCH 03/16] dwarf-reader,ir: Make logging a property of the middle end Dodji Seketeli
2023-09-07 13:39 ` [PATCH 04/16] dwarf-reader: Fix some logging Dodji Seketeli
2023-09-07 13:39 ` [PATCH 05/16] abipkgdiff: Initialize libxml2 to use it in a multi-thread context Dodji Seketeli
2023-09-07 13:40 ` [PATCH 06/16] tools-utils: Avoid endless loop Dodji Seketeli
2023-09-07 13:41 ` [PATCH 07/16] {dwarf,elf}reader: Don't consider no symbol table as an error Dodji Seketeli
2023-09-07 13:41 ` [PATCH 08/16] abipkgdiff: Avoid comparing binaries that are outside of the package Dodji Seketeli
2023-09-07 13:42 ` Dodji Seketeli [this message]
2023-09-07 14:02 ` [PATCH 10/16] ir: Add fn types to type lookup maps Dodji Seketeli
2023-09-07 14:03 ` [PATCH 11/16] ir: Fix forgetting canonicalizing some function types Dodji Seketeli
2023-09-07 14:05 ` [PATCH 12/16] ir: Avoid forgetting potential seemingly duplicated member functions Dodji Seketeli
2023-09-07 14:07 ` [PATCH 13/16] ir: Really avoid canonicalizing decl-only classes Dodji Seketeli
2023-09-07 14:08 ` [PATCH 14/16] ir: Use non qualified typedef name for type canonicalization Dodji Seketeli
2023-09-07 14:09 ` [PATCH 15/16] ir: Fix qualification as non-confirmed propagated canonical types Dodji Seketeli
2023-09-07 14:10 ` [PATCH 16/16] dwarf-reader: Do not re-use typedefs in a scope Dodji Seketeli

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=87edjaf6bi.fsf@redhat.com \
    --to=dodji@redhat.com \
    --cc=libabigail@sourceware.org \
    /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).