This is the mail archive of the libc-alpha@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]

Re: [PATCH] Fix powerpc64/power7 memchr for large input sizes



On 15/12/2016 10:21, Florian Weimer wrote:
> On 12/15/2016 12:56 PM, Adhemerval Zanella wrote:
>> Current optimized powercp64/power7 memchr uses a strategy to check for
>> p versus align(p+n) (where 'p' is the input char pointer and n the
>> maximum size to check for the byte) without taking care for possible
>> overflow on the pointer addition in case of large 'n'.
>>
>> It was triggered by 3038145ca23 where default rawmemchr (used to
>> created ppc64 rawmemchr in ifunc selection) now uses memchr (p, c, (size_t)-1)
>> on its implementation.
> 
> Do we already have a test case which covers this?

No, but it is triggered indirectly by default powerpc64 rawmemchr
on ifunc build (__rawmemchr_ppc).  But now you noted, I think it
worth a testcase addition. 


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