This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, bugfix] builtin expansion of strcmp for rs6000
- From: Aaron Sawdey <acsawdey at linux dot vnet dot ibm dot com>
- To: Peter Bergner <bergner at vnet dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Cc: segher at kernel dot crashing dot org, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>, Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Date: Tue, 17 Jan 2017 09:34:43 -0600
- Subject: Re: [PATCH, bugfix] builtin expansion of strcmp for rs6000
- Authentication-results: sourceware.org; auth=none
- References: <1484155600.10559.2.camel@linux.vnet.ibm.com> <1484600975.15035.4.camel@linux.vnet.ibm.com> <7d07e8fb-d17e-0074-4ebf-7dbbf6ec4dac@vnet.ibm.com>
On Tue, 2017-01-17 at 08:30 -0600, Peter Bergner wrote:
> On 1/16/17 3:09 PM, Aaron Sawdey wrote:
> > Here is an updated version of this patch.
> >
> > Tulio noted that glibc's strncmp test was failing. This turned out
> > to
> > be the use of signed HOST_WIDE_INT for handling strncmp length. The
> > glibc test calls strncmp with length 2^64-1, presumably to provoke
> > exactly this type of bug. Fixing the issue required changing
> > select_block_compare_mode() and expand_block_compare() as well.
>
> If glibc's testsuite exposed a bug, then we should also add a similar
> bug to our testsuite. I scanned the patch and I'm not sure I see
> that exact test scenario. Is it there and I'm just not seeing it?
>
> Peter
>
Nope, you didn't miss it, Peter. I will add such a test as a separate
patch, this one has dragged on for a long time. I have another more
comprehensive test case for strcmp/strncmp I want to add anyway.
Aaron
--
Aaron Sawdey, Ph.D. acsawdey@linux.vnet.ibm.com
050-2/C113 (507) 253-7520 home: 507/263-0782
IBM Linux Technology Center - PPC Toolchain