public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Subject: [PATCH, applied] Bug 29901 - abidiff hangs when comparing libgs.so.10 with itself
Date: Tue, 20 Dec 2022 16:35:26 +0100	[thread overview]
Message-ID: <871qoudr5t.fsf@redhat.com> (raw)

Hello,

This is a follow-up patch to this one:
    88c6e080 Bug 29857 - Better detect comparison cycles in type graph

When looking at the type comparison stack, it looks like a type that
is on the left-hand side of the comparison can appear on the
right-hand side later, in the comparison stack.  The cycle detection
algorithm doesn't take that scenario into account and so that cycle in
the graph of types being compared is not detected.

This patch takes that case into account.

	* src/abg-ir-priv.h (environment::priv::comparison_started): Look
	for each operand of the comparison in both the right-hand and
	left-hand operand stacks.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to the master branch of the git repository.
---
 src/abg-ir-priv.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/abg-ir-priv.h b/src/abg-ir-priv.h
index ae6fabd7..b216c957 100644
--- a/src/abg-ir-priv.h
+++ b/src/abg-ir-priv.h
@@ -1246,8 +1246,9 @@ struct class_or_union::priv
     const environment& env = first.get_environment();
 
     return (env.priv_->left_classes_being_compared_.count(&first)
-	    ||
-	    env.priv_->right_classes_being_compared_.count(&second));
+	    || env.priv_->right_classes_being_compared_.count(&second)
+	    || env.priv_->right_classes_being_compared_.count(&first)
+	    || env.priv_->left_classes_being_compared_.count(&second));
   }
 
   /// Test if a pair of class_or_union is being currently compared.
-- 
2.31.1


-- 
		Dodji


                 reply	other threads:[~2022-12-20 15:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=871qoudr5t.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).