mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: New gcc wrapper to try
Date: Wed, 25 Apr 2012 01:53:39 +0200	[thread overview]
Message-ID: <20120424235339.GV16237@port70.net> (raw)
In-Reply-To: <20120424221423.GA13817@openwall.com>

* Solar Designer <solar@openwall.com> [2012-04-25 02:14:23 +0400]:
> On Tue, Apr 24, 2012 at 06:10:40PM -0400, Rich Felker wrote:
> > On Tue, Apr 24, 2012 at 05:41:27PM -0400, Rich Felker wrote:
> > > The problem is that the default gcc build incorporates glibc ABI
> > > knowledge (layout of the thread structure) and the assumption that the
> > > thread pointer has been initialized into any binary built with stack
> > > protector. Just adding symbols will not fix anything.
> 
> I did not realize that.
> 
> > ......but since you requested it, I'm working on trying to make it
> > work anyway. We'll see how it goes. Preliminary support was just
> > committed.
> 
> Wow.  At this time, I suggested it as being good for the musl project
> rather than requested it for my own use (although I imagine that I might
> want to use it at some point), but this does not make me any less
> impressed by your work on it.
> 

btw i noticed that with the modified gcc where
-fstack-protector is enabled by default, the
stricter -fstack-protector-all does not work
(at least here with gcc 4.4.3)

the workaround is to turn it off and on again:
-fno-stack-protector -fstack-protector-all
works

this might be good to know when someone tries to
catch stack corruption issues


actually it would be quite useful if the compiler
could emit proper bounds check for stack access

address-sanitizer does something like that
https://code.google.com/p/address-sanitizer/

stack corruption bugs can be annoying to debug
without such a tool



  reply	other threads:[~2012-04-24 23:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-21  6:49 Rich Felker
2012-04-21 20:37 ` Rich Felker
2012-04-23  5:57   ` Isaac Dunham
2012-04-23  9:19     ` Rich Felker
2012-04-24 19:28       ` Isaac Dunham
2012-04-24 19:45         ` Isaac Dunham
2012-04-24 21:28         ` Solar Designer
2012-04-24 21:41           ` Rich Felker
2012-04-24 22:10             ` Rich Felker
2012-04-24 22:14               ` Solar Designer
2012-04-24 23:53                 ` Szabolcs Nagy [this message]
2012-04-25  1:21                   ` Solar Designer
2012-04-21 22:45 ` Isaac Dunham

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=20120424235339.GV16237@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).