From: Segher Boessenkool <segher@kernel.crashing.org>
To: Raphael Moreira Zinsly <rzinsly@linux.ibm.com>
Cc: gcc-patches@gcc.gnu.org, seurer@gcc.gnu.org,
bergner@linux.ibm.com, wschmidt@linux.ibm.com, dje.gcc@gmail.com,
jakub@gcc.gnu.org, tuliom@linux.ibm.com
Subject: Re: [PATCH v2] libgcc: fix backtrace fallback on PowerPC Big-endian. [PR103004]
Date: Thu, 11 Nov 2021 09:32:44 -0600 [thread overview]
Message-ID: <20211111153244.GI614@gate.crashing.org> (raw)
In-Reply-To: <20211111144010.23506-1-rzinsly@linux.ibm.com>
Hi!
On Thu, Nov 11, 2021 at 11:40:10AM -0300, Raphael Moreira Zinsly wrote:
> Changes since v1:
> - Removed -Wmissing-prototypes fix.
> - Fixed formatting of Changelog and patch.
>
> --->8---
>
> At the end of the backtrace stream _Unwind_Find_FDE() may not be able
> to find the frame unwind info and will later call the backtrace fallback
> instead of finishing. This occurs when using an old libc on ppc64 due to
> dl_iterate_phdr() not being able to set the fde in the last trace.
> When this occurs the cfa of the trace will be behind of context's cfa.
> Also, libgo’s probestackmaps() calls the backtrace with a null pointer
> and can get to the backchain fallback with the same problem, in this case
> we are only interested in find a stack map, we don't need nor can do a
> backchain.
> _Unwind_ForcedUnwind_Phase2() can hit the same issue as it uses
> uw_frame_state_for(), so we need to treat _URC_NORMAL_STOP.
>
> libgcc/ChangeLog:
>
> * config/rs6000/linux-unwind.h (ppc_backchain_fallback): Check if it's
> called with a null argument or at the end of the backtrace and return.
> * unwind.inc (_Unwind_ForcedUnwind_Phase2): Treat _URC_NORMAL_STOP.
Committed, thanks! Please note the changelog formatting fixes I had
to do, for later patches :-)
Segher
prev parent reply other threads:[~2021-11-11 15:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-11 14:40 Raphael Moreira Zinsly
2021-11-11 15:32 ` Segher Boessenkool [this message]
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=20211111153244.GI614@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=bergner@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@gcc.gnu.org \
--cc=rzinsly@linux.ibm.com \
--cc=seurer@gcc.gnu.org \
--cc=tuliom@linux.ibm.com \
--cc=wschmidt@linux.ibm.com \
/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).