Mercurial > illumos > illumos-gate
changeset 10931:930e138fb604
6886377 memmove() (libc.so.1) function defect
author | Sudheer A <Sudheer.Abdul-Salam@Sun.COM> |
---|---|
date | Mon, 02 Nov 2009 13:34:05 -0800 |
parents | 5c243175898c |
children | 522e54a523c2 |
files | usr/src/lib/libc/i386/gen/memcpy.s usr/src/lib/libc/i386_hwcap1/gen/memcpy.s |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/libc/i386/gen/memcpy.s Mon Nov 02 13:10:06 2009 -0800 +++ b/usr/src/lib/libc/i386/gen/memcpy.s Mon Nov 02 13:34:05 2009 -0800 @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -66,9 +66,9 @@ movl $3,%eax / heavily used constant cmpl %esi,%edi / if (source addr > dest addr) leal -1(%esi,%ecx),%edx - jle .CopyRight / + jbe .CopyRight / cmpl %edx,%edi - jle .CopyLeft + jbe .CopyLeft .CopyRight: cmpl $8,%ecx / if (size < 8 bytes) jbe .OneByteCopy / goto fast short copy loop
--- a/usr/src/lib/libc/i386_hwcap1/gen/memcpy.s Mon Nov 02 13:10:06 2009 -0800 +++ b/usr/src/lib/libc/i386_hwcap1/gen/memcpy.s Mon Nov 02 13:34:05 2009 -0800 @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -43,9 +43,9 @@ cmpl %esi,%edi / if (source addr > dest addr) leal -1(%esi,%ecx),%edx / %edx = src + size - 1 - jle .memcpy_post / jump if dst < src + jbe .memcpy_post / jump if dst <= src cmpl %edx,%edi - jle .CopyLeft / jump if dst <= src + size - 1 + jbe .CopyLeft / jump if dst <= src + size - 1 jmp .memcpy_post ENTRY(memcpy)