From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40951 invoked by alias); 3 Dec 2018 13:40:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 40935 invoked by uid 89); 3 Dec 2018 13:40:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=2.1 required=5.0 tests=BAYES_00,KAM_NUMSUBJECT,KAM_SHORT,RCVD_IN_DNSWL_NONE,SEM_URI,SEM_URIRED,SPF_PASS autolearn=no version=3.3.2 spammy=corrupted, H*i:sk:CAFiYyc, wdijkstr@arm.com, wdijkstrarmcom X-HELO: mail-ua1-f65.google.com Received: from mail-ua1-f65.google.com (HELO mail-ua1-f65.google.com) (209.85.222.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Dec 2018 13:40:31 +0000 Received: by mail-ua1-f65.google.com with SMTP id z11so4398157uaa.10 for ; Mon, 03 Dec 2018 05:40:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=s7zF+nvLdKF9kxJCzpUJ5ITcqp5pkpGcBKmZbB08ohY=; b=flWuP7uOomabWNV2nLFL6dgEPSfZks5y7rwc6U9qg5ftNFIIJJqgNEsBY0Mf8rxhO1 nPSPaIbHZ5mkZh6PeVTeIxLWamNpjxbLpGB4IupMOwsUUuOiGpwg5wKCbsb+I5BCYW7R 38pdhsbRN4ZksA5Bounuw2R18GjlV2do3tkuU= MIME-Version: 1.0 References: <8d85508a-f679-54fb-af20-4f267b813df0@redhat.com> In-Reply-To: From: Christophe Lyon Date: Mon, 03 Dec 2018 13:40:00 -0000 Message-ID: Subject: Re: [PATCH] Fix PR64242 To: Richard Biener Cc: Jeff Law , Wilco Dijkstra , gcc Patches , nd Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00074.txt.bz2 On Mon, 3 Dec 2018 at 14:35, Richard Biener wrote: > > On Sat, Dec 1, 2018 at 12:07 AM Jeff Law 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 > > > > > > 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