From: Thomas Neumann <thomas.neumann@in.tum.de>
To: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>,
Richard Biener <richard.guenther@gmail.com>
Cc: "Sören Tempel" <soeren@soeren-tempel.net>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
"alice@ayaya.dev" <alice@ayaya.dev>
Subject: Re: [PATCH] Fix assertion for unwind-dw2-fde.c btree changes
Date: Mon, 15 May 2023 15:05:51 +0200 [thread overview]
Message-ID: <60bab096-fa10-345a-1b18-0f05585e0a14@in.tum.de> (raw)
In-Reply-To: <PAXPR08MB692675450D158B1EF8DDBA7793789@PAXPR08MB6926.eurprd08.prod.outlook.com>
> Hello, this patch breaks the build on targets where range is not declared i.e. where the #ifdef ATOMIC_FDE_FAST_PATH path is not taken.
argh, I did not realize I tested the patch only on atomic fast path
platforms. The patch below fixes that by moving the check inside the #ifdef.
I will check that everything works on atomic and non-atomic platforms
and commit the trivial move then. Sorry for the breakage.
Best
Thomas
From 550dc27f547a067e96137adeb85148d8a84c81a0 Mon Sep 17 00:00:00 2001
From: Thomas Neumann <tneumann@users.sourceforge.net>
Date: Mon, 15 May 2023 14:59:22 +0200
Subject: [PATCH] fix assert in non-atomic path
The non-atomic path does not have range information,
we have to adjust the assert handle that case, too.
libgcc/ChangeLog:
* unwind-dw2-fde.c: Fix assert in non-atomic path.
---
libgcc/unwind-dw2-fde.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libgcc/unwind-dw2-fde.c b/libgcc/unwind-dw2-fde.c
index 8683a65aa02..df461a1527d 100644
--- a/libgcc/unwind-dw2-fde.c
+++ b/libgcc/unwind-dw2-fde.c
@@ -240,6 +240,7 @@ __deregister_frame_info_bases (const void *begin)
// And remove
ob = btree_remove (®istered_frames, range[0]);
+ bool empty_table = (range[1] - range[0]) == 0;
#else
init_object_mutex_once ();
__gthread_mutex_lock (&object_mutex);
@@ -276,11 +277,12 @@ __deregister_frame_info_bases (const void *begin)
out:
__gthread_mutex_unlock (&object_mutex);
+ bool empty_table = false;
#endif
// If we didn't find anything in the lookup data structures then they
// were either already destroyed or we tried to remove an empty range.
- gcc_assert (in_shutdown || ((range[1] - range[0]) == 0 || ob));
+ gcc_assert (in_shutdown || (empty_table || ob));
return (void *) ob;
}
--
2.39.2
next prev parent reply other threads:[~2023-05-15 13:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-14 16:09 Sören Tempel
2023-05-14 18:59 ` Thomas Neumann
2023-05-14 19:52 ` alice
2023-05-14 22:35 ` Thomas Neumann
2023-05-14 23:09 ` alice
2023-05-15 7:59 ` Richard Biener
2023-05-15 12:52 ` Kyrylo Tkachov
2023-05-15 13:05 ` Thomas Neumann [this message]
2023-05-15 13:28 ` Kyrylo Tkachov
2023-05-15 13:31 ` Jeff Law
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=60bab096-fa10-345a-1b18-0f05585e0a14@in.tum.de \
--to=thomas.neumann@in.tum.de \
--cc=Kyrylo.Tkachov@arm.com \
--cc=alice@ayaya.dev \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
--cc=soeren@soeren-tempel.net \
/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).