From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11501 invoked by alias); 1 Dec 2012 07:50:51 -0000 Received: (qmail 11482 invoked by uid 22791); 1 Dec 2012 07:50:48 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wi0-f181.google.com (HELO mail-wi0-f181.google.com) (209.85.212.181) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 01 Dec 2012 07:50:43 +0000 Received: by mail-wi0-f181.google.com with SMTP id hm9so99316wib.8 for ; Fri, 30 Nov 2012 23:50:41 -0800 (PST) Received: by 10.180.97.137 with SMTP id ea9mr1286841wib.13.1354348241802; Fri, 30 Nov 2012 23:50:41 -0800 (PST) Received: from [192.168.1.7] (16.122.69.86.rev.sfr.net. [86.69.122.16]) by mx.google.com with ESMTPS id dm3sm1830816wib.9.2012.11.30.23.50.39 (version=SSLv3 cipher=OTHER); Fri, 30 Nov 2012 23:50:40 -0800 (PST) Message-ID: <1354348237.2597.2.camel@mathieu-UX21E> Subject: Re: using -fsplit-stack From: mathieu lacage To: Ian Lance Taylor Cc: gcc-help Date: Sat, 01 Dec 2012 07:50:00 -0000 In-Reply-To: References: <1354284795.6211.28.camel@mathieu-UX21E> <1354309786.2662.18.camel@mathieu-UX21E> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg00002.txt.bz2 On Fri, 2012-11-30 at 14:22 -0800, Ian Lance Taylor wrote: > On Fri, Nov 30, 2012 at 1:09 PM, mathieu lacage > wrote: > > > > Well, it seems to be segfaulting on my box because the default stack > > space is smaller that the above (big ?) array. > > Please reply to the mailing list, not just to me. Thanks. stupid mailer keeps ignoring my "reply all" :/ > > I see. There does seem to be something wrong here; the split stack > code ought to have allocated a new stack for you. > > > How is this expected to > > fail if I am not using gold ? (at link-time or run-time ?) > > If you don't use gold your test case will fail at runtime because the > main function won't realize that it needs to allocate enough stack > space for printf. > > > Are you aware of anyone who has tried to rebuild a distribution with > > this flag and make the system gcc use this flag by default? It would be > > nice from a usability perspective to not have to worry about stack size > > ever without having to pay too high for this. > > I am not aware of anybody who has done this. I think it would be a > significant effort. Right. I am merely curious. Having -fsplit-stack work out of the box for new binaries and libraries I compile on normal distributions is good enough for me. I will report on further experiments, with PIE executables on other distributions and with other gcc versions. thanks a lot, Mathieu