From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17762 invoked by alias); 26 Jul 2013 07:38:09 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 17679 invoked by uid 55); 26 Jul 2013 07:38:06 -0000 From: "neleai at seznam dot cz" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/15786] ifunc resolver functions can smash function arguments Date: Fri, 26 Jul 2013 07:38:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: 2.17 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: neleai at seznam dot cz X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-07/txt/msg00155.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15786 --- Comment #6 from Ondrej Bilka --- 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 changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |bugdal at aerifal dot cx > > --- Comment #4 from Rich Felker --- > 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.