On Mon, Apr 28, 2014 at 11:25 AM, Sébastien Bernard <sbern...@nerim.net>wrote:

>  Le 28/04/2014 16:05, Patrick Baggett a écrit :
>
>  strcmp() may well be implemented by word comparisons. But then it
>
>>  is the duty of the implementation to properly handle the ends of
>>> the strings even if those are not word aligned.
>>>
>>  Indeed, the correct fix is using strcmp. Meanwhile, the package is
>> broken.
>>
>>
>  Wow, that's pretty bad. How did that slip? Also, are you building 64-bit
> or 32-bit code, and what CPU architecture (perhaps some per-CPU
> implementation is buggy but not others?) This information will help when
> tracking down the issue.
>
>   I think this happens in this particular case comparing \000x and \0000.
> I had a look at my test_case, the build is 32bit and the called function
> is dynamic in the glibc.
> I tried a 64bit build, it's the same problem.
> I tried various optimization flags and using __builtin_strcmp withtout any
> change.
>
> Could you check this little program test against one of your machine ?
> Just to be sure ?
>
> Yeah sure, no problem -- I'll check it out soon. I'm somewhat comfortable
with SPARC assembly, so I'll see if I can dig a little deeper into why it
is failing.

Reply via email to