public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
To: Thomas Neumann <thomas.neumann@in.tum.de>,
	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 13:28:12 +0000	[thread overview]
Message-ID: <PAXPR08MB69260A947F424C3DDB1DC0F993789@PAXPR08MB6926.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <60bab096-fa10-345a-1b18-0f05585e0a14@in.tum.de>



> -----Original Message-----
> From: Thomas Neumann <thomas.neumann@in.tum.de>
> Sent: Monday, May 15, 2023 2:06 PM
> 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;
> alice@ayaya.dev
> Subject: Re: [PATCH] Fix assertion for unwind-dw2-fde.c btree changes
> 
> > 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.

Thanks for the quick fix. I can confirm the aarch64 build succeeds now.
Kyrill

> 
> 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 (&registered_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
> 


  reply	other threads:[~2023-05-15 13:28 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
2023-05-15 13:28         ` Kyrylo Tkachov [this message]
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=PAXPR08MB69260A947F424C3DDB1DC0F993789@PAXPR08MB6926.eurprd08.prod.outlook.com \
    --to=kyrylo.tkachov@arm.com \
    --cc=alice@ayaya.dev \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    --cc=soeren@soeren-tempel.net \
    --cc=thomas.neumann@in.tum.de \
    /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).