This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15674] __memcmp_ssse3 tries to read past the array bounary
- From: "neleai at seznam dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 25 Jun 2013 13:18:10 +0000
- Subject: [Bug libc/15674] __memcmp_ssse3 tries to read past the array bounary
- Auto-submitted: auto-generated
- References: <bug-15674-131 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15674
--- Comment #3 from Ondrej Bilka <neleai at seznam dot cz> ---
On Tue, Jun 25, 2013 at 12:51:02PM +0000, liubov.dmitrieva at gmail dot com
wrote:
> http://sourceware.org/bugzilla/show_bug.cgi?id=15674
>
> --- Comment #2 from Liubov Dmitrieva <liubov.dmitrieva at gmail dot com> ---
> This patch fixes the issue. Tested on my machines.
>
> diff --git a/sysdeps/x86_64/multiarch/memcmp-ssse3.S
> b/sysdeps/x86_64/multiarch/memcmp-ssse3.S
> index bdd2ed2..e319df9 100644
> --- a/sysdeps/x86_64/multiarch/memcmp-ssse3.S
> +++ b/sysdeps/x86_64/multiarch/memcmp-ssse3.S
> @@ -1463,10 +1463,8 @@ L(next_24_bytes):
> test $0x40, %dh
> jnz L(Byte22)
>
> - mov -9(%rdi), %eax
> - and $0xff, %eax
> - mov -9(%rsi), %edx
> - and $0xff, %edx
> + movzbl -9(%rdi), %eax
> + movzbl -9(%rsi), %edx
> sub %edx, %eax
> ret
> # else
>
Could you send this to libc-alpha. Where was problem? This code looks at first
glance equivalent.
--
You are receiving this mail because:
You are on the CC list for the bug.