This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR64242
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jeff Law <law at redhat dot com>, Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>, gcc Patches <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>
- Date: Mon, 3 Dec 2018 14:40:17 +0100
- Subject: Re: [PATCH] Fix PR64242
- References: <DB5PR08MB1030265410188ED40A00733183D20@DB5PR08MB1030.eurprd08.prod.outlook.com> <8d85508a-f679-54fb-af20-4f267b813df0@redhat.com> <CAFiYyc2tposVpP7bF7GPSJygi-as7OQj8BwCP6=asw_xttR9UA@mail.gmail.com>
On Mon, 3 Dec 2018 at 14:35, Richard Biener <richard.guenther@gmail.com> wrote:
>
> On Sat, Dec 1, 2018 at 12:07 AM Jeff Law <law@redhat.com> wrote:
> >
> > On 11/29/18 12:26 PM, Wilco Dijkstra wrote:
> > > Fix PR64242 - the middle end expansion for long jmp updates the
> > > hard frame pointer before it reads the new stack pointer. This
> > > results in a corrupted stack pointer if the jmp buffer is a local.
> > > The obvious fix is to insert a temporary.
> > >
> > > AArch64 bootstrap & regress pass. OK to commit?
> > >
> > > ChangeLog:
> > > 2018-11-29 Wilco Dijkstra <wdijkstr@arm.com>
> > >
> > > gcc/
> > > PR middle-end/64242
> > > * builtins.c (expand_builtin_longjmp): Use a temporary when restoring
> > > the frame pointer.
> > > (expand_builtin_nonlocal_goto): Likewise.
> > >
> > > testsuite/
> > > PR middle-end/64242
> > > * gcc.c-torture/execute/pr64242.c: New test.
> > THanks for tracking this down. I'd like to have this run through my
> > next testing cycle, so I went ahead and installed it for you.
>
> The testcase runfails on x86_64 with -m32 and -m64.
>
And on some arm targets, as I mentioned in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64242#c7
> Richard.
>
> > Thanks again,
> > Jeff