[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#635885: libc6: strchr() behavior changed

Jonathan Nieder <jrnieder@gmail.com> wrote:

> Hi Michal,

Hi, thank you for your response.

> This sounded to me like PR12159, which was fixed by glibc-2.13~64 (Fix
> x86-64 strchr propagation of search byte into all bytes of SSE
> register, 2010-10-25), but I am not able to reproduce it.  I get all
> [0] values (pointers to the end of string), the correct behavior.

This pretty much sounds like it. The disassembly of strchr() in
that libc.so utilizes xmm registers heavily and in that bug report value
"\xff" is used like "-1" in my test case.

Thanks for finding that report, I think this solves my problem.

> I tried to reproduce first using strchr.S directly on Debian sid, then
> using plain libc6 in a squeeze Debian live system running through kvm.
> I compiled with -O0 so I don't think gcc optimized out the strchr
> calls.  Any idea what I'm doing wrong?  What machine architecture do
> you use?

This is Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz.

Reply to: