On Mon, 3 Dec 2018 at 14:35, Richard Biener <richard.guent...@gmail.com> wrote: > > On Sat, Dec 1, 2018 at 12:07 AM Jeff Law <l...@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 <wdijk...@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