This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug dynamic-link/15786] ifunc resolver functions can smash function arguments
- From: "neleai at seznam dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 26 Jul 2013 07:38:06 +0000
- Subject: [Bug dynamic-link/15786] ifunc resolver functions can smash function arguments
- Auto-submitted: auto-generated
- References: <bug-15786-131 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15786
--- Comment #6 from Ondrej Bilka <neleai at seznam dot cz> ---
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.
--
You are receiving this mail because:
You are on the CC list for the bug.