public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Thomas Neumann <thomas.neumann@in.tum.de>
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
Date: Mon, 15 May 2023 09:59:27 +0200	[thread overview]
Message-ID: <CAFiYyc04jT4+58etN6+Zz8F9=7Mr2keVVbcWFioNUeuVC4=Cqg@mail.gmail.com> (raw)
In-Reply-To: <23a59ecf-9f5e-4d55-9f31-48242b775ec7@in.tum.de>

On Sun, May 14, 2023 at 9:00 PM Thomas Neumann via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Dear Sören,
>
> > we ran into a regression introduced by these changes. The regression
> > manifests itself in a failing assertion in __deregister_frame_info_bases.
> > The assertion failure was observed while using Chromium's `flatc` build
> > system tool. The failing assertion is:
> >
> >       unwind-dw2-fde.c:281    gcc_assert (in_shutdown || ob);
> > [snip]
> > However, I believe there is one more edge case that isn't being account
> > for presently: If the inserted entry has a size of 0 (i.e. if range[1] -
> > range[0] == 0) then the btree_insert call in __register_frame_info_bases
> > will not insert anything. This is not accounted for in
>  > [snip]
> >
> > Would be cool if this could be fixed on the GCC trunk.
>
> thanks for the details analysis and the patch, it looks obviously
> correct for me. I can apply it to trunk, but we need approval from a gcc
> maintainer first.

The patch is OK for trunk and affected branches.

Thanks,
Richard.

> But independent of your patch, do you have the test case available in
> some easily accessible form, for example a docker image or an automated
> build script? I ask because something odd is happening here, somebody
> registered a non-empty EH that does not contain a single unwind range. I
> am puzzled why anybody would do that, I would like to double check that
> this is indeed the intended behavior and not a bug somewhere else. Or if
> you have the test case at hand, it would be great if you could do a
> quick step through get_pc_range for the affected frame to double-check
> that the table is indeed empty and we don't miss an entry for some
> strange reason.
>
> Best
>
> Thomas
>
>
>

  parent reply	other threads:[~2023-05-15  7:59 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 [this message]
2023-05-15 12:52     ` Kyrylo Tkachov
2023-05-15 13:05       ` Thomas Neumann
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='CAFiYyc04jT4+58etN6+Zz8F9=7Mr2keVVbcWFioNUeuVC4=Cqg@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=alice@ayaya.dev \
    --cc=gcc-patches@gcc.gnu.org \
    --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).