public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: mathieu lacage <mathieu.lacage@cutebugs.net>
To: Ian Lance Taylor <iant@google.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: using -fsplit-stack
Date: Sat, 01 Dec 2012 07:50:00 -0000	[thread overview]
Message-ID: <1354348237.2597.2.camel@mathieu-UX21E> (raw)
In-Reply-To: <CAKOQZ8yQj3pM6j2gcY7U7SGXd2u9UE8aEqP2ta3wNHKSp5Gvzw@mail.gmail.com>

On Fri, 2012-11-30 at 14:22 -0800, Ian Lance Taylor wrote:
> On Fri, Nov 30, 2012 at 1:09 PM, mathieu lacage
> <mathieu.lacage@cutebugs.net> 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

      parent reply	other threads:[~2012-12-01  7:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30 14:13 mathieu lacage
2012-11-30 15:16 ` Ian Lance Taylor
2012-11-30 21:10   ` mathieu lacage
     [not found]     ` <CAKOQZ8yQj3pM6j2gcY7U7SGXd2u9UE8aEqP2ta3wNHKSp5Gvzw@mail.gmail.com>
2012-12-01  7:50       ` mathieu lacage [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1354348237.2597.2.camel@mathieu-UX21E \
    --to=mathieu.lacage@cutebugs.net \
    --cc=gcc-help@gcc.gnu.org \
    --cc=iant@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).