This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug dynamic-link/15786] ifunc resolver functions can smash function arguments


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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]