This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix powerpc64/power7 memchr for large input sizes
- From: Florian Weimer <fweimer at redhat dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 15 Dec 2016 13:21:26 +0100
- Subject: Re: [PATCH] Fix powerpc64/power7 memchr for large input sizes
- Authentication-results: sourceware.org; auth=none
- References: <1481802979-4302-1-git-send-email-adhemerval.zanella@linaro.org>
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?
Thanks,
Florian