public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Ondřej Bílka" <neleai@seznam.cz>
To: bugdal at aerifal dot cx <sourceware-bugzilla@sourceware.org>
Cc: glibc-bugs@sourceware.org
Subject: Re: [Bug dynamic-link/15786] ifunc resolver functions can smash function arguments
Date: Fri, 26 Jul 2013 07:38:00 -0000	[thread overview]
Message-ID: <20130726073749.GA5582@domone.kolej.mff.cuni.cz> (raw)
In-Reply-To: <bug-15786-131-BxORhj45sV@http.sourceware.org/bugzilla/>

On Fri, Jul 26, 2013 at 07:29:14AM +0000, bugdal at aerifal dot cx wrote:
> http://sourceware.org/bugzilla/show_bug.cgi?id=15786
> 
> Rich Felker <bugdal at aerifal dot cx> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |bugdal at aerifal dot cx
> 
> --- Comment #4 from Rich Felker <bugdal at aerifal dot cx> ---
> This is definitely a bug in gcc. It is impossible to write "a function that
> does not clobber register X" without writing pure assembly, because the
> compiler is free to use any non-call-saved register for any purpose it likes.
> Even a simple for loop that performs copying might get optimized to use vector
> registers.
> 
> Moreover, I believe this bug is related to existing bug reports (I'm not sure
> of their status) for the non-ifunc resolver. If I'm not mistaken, right now,
> it's tiptoeing around the vector registers by avoiding calling certain string
> functions. This is of course wrong because it's making assumptions about the
> compiler's choice of register usage in code generation. Both issues would be
> fixed, and the code would cease to be senselessly fragile, if the asm entry
> point for the resolver simply saved and restored all call-clobbered registers
> like it should.
>
Another issue caused by not saving floating point registers. I will
sumbit patch to save fp registers.


  reply	other threads:[~2013-07-26  7:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-25 22:51 [Bug dynamic-link/15786] New: " cworth at cworth dot org
2013-07-25 22:51 ` [Bug dynamic-link/15786] " cworth at cworth dot org
2013-07-25 22:51 ` cworth at cworth dot org
2013-07-25 22:52 ` cworth at cworth dot org
2013-07-26  7:29 ` bugdal at aerifal dot cx
2013-07-26  7:38   ` Ondřej Bílka [this message]
2013-07-26  7:30 ` bugdal at aerifal dot cx
2013-07-26  7:38 ` neleai at seznam dot cz
2014-06-13 13:19 ` fweimer at redhat dot com
2015-08-28 19:56 ` hjl.tools at gmail dot com

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=20130726073749.GA5582@domone.kolej.mff.cuni.cz \
    --to=neleai@seznam.cz \
    --cc=glibc-bugs@sourceware.org \
    --cc=sourceware-bugzilla@sourceware.org \
    /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).