[prev in list] [next in list] [prev in thread] [next in thread]
List: glibc-alpha
Subject: Re: [RFC] strcpy optimizations
From: Petr Baudis <pasky () ucw ! cz>
Date: 2013-01-30 13:33:41
Message-ID: 20130130133340.GT7623 () machine ! or ! cz
[Download RAW message or body]
On Wed, Jan 30, 2013 at 01:49:56PM +0100, Ondřej Bílka wrote:
> On Wed, Jan 30, 2013 at 01:26:14PM +0100, Petr Baudis wrote:
> > On Tue, Jan 29, 2013 at 01:30:09PM -0800, Paul Eggert wrote:
> > > strncpy should be lower priority, I'd say. Typically, a program
> > > that uses strncpy doesn't care all that much about performance.
> >
> > That seems a most intriguing insight to me. Why would that be so?
> >
> Because of c standard strncpy must zero remaining bytes upto n.
>
> This is problematic, for example when we set strncpy breakpoint in gimp
> then first entry is:
>
> strncpy (x=0x7fffffffc3a0 "@P[\366\377\177", y=0x7ffff2a0961f "/usr/share/X11/locale", n=4096)
Right! I'm stupid, somehow I was thinking strncmp in my head...
Sorry for the noise,
Petr "Pasky" Baudis
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic