From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85625 invoked by alias); 14 Sep 2015 08:29:09 -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 84982 invoked by uid 89); 14 Sep 2015 08:29:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_40,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 14 Sep 2015 08:29:07 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 694CF2A30354 for ; Mon, 14 Sep 2015 10:24:43 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XKcr5lpOdzT8 for ; Mon, 14 Sep 2015 10:24:21 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 5C2B32A2E226 for ; Mon, 14 Sep 2015 10:23:40 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [patch] Bump size of stack checking protection area Date: Mon, 14 Sep 2015 08:32:00 -0000 Message-ID: <2953624.HgYYlYoG9S@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.29-desktop; KDE/4.7.2; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart2521262.5AQBH72mLB" Content-Transfer-Encoding: 7Bit X-SW-Source: 2015-09/txt/msg00904.txt.bz2 --nextPart2521262.5AQBH72mLB Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Content-length: 765 Hi, as documented, STACK_CHECK_PROTECT is supposed to be an "estimate of the amount of stack required to propagate an exception". It's (mainly) for Ada and it needs to distinguish the various EH schemes, which might have different needs. While the current setting is OK for the front-end SJLJ scheme used up to now in Ada, it's not sufficient for the middle-end SJLJ scheme that we are experimenting with; you need 8K on some platforms to pass the ACATS testsuite. Tested on x86_64-suse-linux, OK for the mainline? 2015-09-14 Eric Botcazou * defaults.h (STACK_OLD_CHECK_PROTECT): Adjust for -fno-exceptions. Bump to 4K for SJLJ exceptions. (STACK_CHECK_PROTECT): Likewise. Bump to 8K for SJLJ exceptions. -- Eric Botcazou --nextPart2521262.5AQBH72mLB Content-Disposition: attachment; filename="p.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="utf-8"; name="p.diff" Content-length: 1229 Index: defaults.h =================================================================== --- defaults.h (revision 227729) +++ defaults.h (working copy) @@ -1406,9 +1406,11 @@ see the files COPYING3 and COPYING.RUNTI #define STACK_OLD_CHECK_PROTECT STACK_CHECK_PROTECT #else #define STACK_OLD_CHECK_PROTECT \ - (targetm_common.except_unwind_info (&global_options) == UI_SJLJ \ + (!global_options.x_flag_exceptions \ ? 75 * UNITS_PER_WORD \ - : 8 * 1024) + : targetm_common.except_unwind_info (&global_options) == UI_SJLJ \ + ? 4 * 1024 \ + : 8 * 1024) #endif /* Minimum amount of stack required to recover from an anticipated stack @@ -1416,9 +1418,11 @@ see the files COPYING3 and COPYING.RUNTI of stack required to propagate an exception. */ #ifndef STACK_CHECK_PROTECT #define STACK_CHECK_PROTECT \ - (targetm_common.except_unwind_info (&global_options) == UI_SJLJ \ - ? 75 * UNITS_PER_WORD \ - : 12 * 1024) + (!global_options.x_flag_exceptions \ + ? 4 * 1024 \ + : targetm_common.except_unwind_info (&global_options) == UI_SJLJ \ + ? 8 * 1024 \ + : 12 * 1024) #endif /* Make the maximum frame size be the largest we can and still only need --nextPart2521262.5AQBH72mLB--