public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@seketeli.org>
To: Dodji Seketeli via Libabigail <libabigail@sourceware.org>
Cc: Dodji Seketeli <dodji@redhat.com>
Subject: [PATCH 1/3, applied] Bug 29857 - Don't pop comparison operands that haven't been pushed
Date: Mon, 19 Dec 2022 18:11:02 +0100	[thread overview]
Message-ID: <87sfhbe2u1.fsf@seketeli.org> (raw)
In-Reply-To: <87wn6ne30e.fsf@redhat.com> (Dodji Seketeli via Libabigail's message of "Mon, 19 Dec 2022 18:07:13 +0100")

Hello,

While looking at bug
https://sourceware.org/bugzilla/show_bug.cgi?id=29857, I noticed a
crash that is happening due to the fact that the equal overload for
classes tries pop comparison operands that haven't been pushed to the
stack of comparison operands.  Oops.  Fixed thus.

	* src/abg-ir.cc (equals): In the overload for class_or_union,
	don't try to pop, operands that haven't been pushed.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
 src/abg-ir.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/abg-ir.cc b/src/abg-ir.cc
index 2719954e..4b375c1a 100644
--- a/src/abg-ir.cc
+++ b/src/abg-ir.cc
@@ -22042,7 +22042,7 @@ equals(const class_or_union& l, const class_or_union& r, change_kind* k)
       if (!val)
 	if (k)
 	  *k |= LOCAL_TYPE_CHANGE_KIND;
-      RETURN(val);
+      ABG_RETURN(val);
     }
 
   // No need to go further if the classes have different names or
-- 
2.31.1



-- 
		Dodji

  reply	other threads:[~2022-12-19 17:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19 17:07 [PATCH 0/3, applied] Bug 29857 - Fix comparing binary with decl-only unions & cycles Dodji Seketeli
2022-12-19 17:11 ` Dodji Seketeli [this message]
2022-12-19 17:12 ` [PATCH 2/3, applied] Bug 29857 - dwarf-reader: Resolve decl-only unions Dodji Seketeli
2022-12-19 17:14 ` [PATCH 3/3, applied] Bug 29857 - Better detect comparison cycles in type graph 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=87sfhbe2u1.fsf@seketeli.org \
    --to=dodji@seketeli.org \
    --cc=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).