Re: [PATCH, bugfix] builtin expansion of strcmp for rs6000

2017-01-17 Thread Aaron Sawdey
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

Re: [PATCH, bugfix] builtin expansion of strcmp for rs6000

2017-01-17 Thread Peter Bergner
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 t

Re: [PATCH, bugfix] builtin expansion of strcmp for rs6000

2017-01-16 Thread Segher Boessenkool
On Mon, Jan 16, 2017 at 03:09:35PM -0600, Aaron Sawdey wrote: > 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

Re: [PATCH, bugfix] builtin expansion of strcmp for rs6000

2017-01-16 Thread Aaron Sawdey
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 require