This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATH] [BZ 15674] Fix reading past the array boundary in __memcmp_ssse3
- From: Richard Henderson <rth at twiddle dot net>
- To: Dmitrieva Liubov <liubov dot dmitrieva at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 25 Jun 2013 08:49:35 -0700
- Subject: Re: [PATH] [BZ 15674] Fix reading past the array boundary in __memcmp_ssse3
- References: <CAHjhQ92DBAVCozvunaCNhRgswUHcQL42Yc24pieVVU=GGBFrww at mail dot gmail dot com>
On 06/25/2013 07:11 AM, Dmitrieva Liubov wrote:
> - mov -9(%rdi), %eax
> - and $0xff, %eax
> - mov -9(%rsi), %edx
> - and $0xff, %edx
> +/* Movzbl reads only one byte and
> + doesn't read past the array boundary. */
> +
> + movzbl -9(%rdi), %eax
> + movzbl -9(%rsi), %edx
We surely don't need a comment about how a non-obscure x86 architecture insn
operates. The fix itself itself is obviously correct.
r~