public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/release/2.36/master] sparc: Fix sparc64 memmove length comparison (BZ 31266)
@ 2024-02-02 13:25 Adhemerval Zanella
  0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2024-02-02 13:25 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f4171ba5e5a772217ed0ebb80701fe1698407252

commit f4171ba5e5a772217ed0ebb80701fe1698407252
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jan 18 10:52:18 2024 -0300

    sparc: Fix sparc64 memmove length comparison (BZ 31266)
    
    The small counts copy bytes comparsion should be unsigned (as the
    memmove size argument).  It fixes string/tst-memmove-overflow on
    sparcv9, where the input size triggers an invalid code path.
    
    Checked on sparc64-linux-gnu and sparcv9-linux-gnu.
    
    (cherry picked from commit 926a4bdbb5fc8955570208b5571b2d04c6ffbd1d)

Diff:
---
 sysdeps/sparc/sparc64/memmove.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/sparc/sparc64/memmove.S b/sysdeps/sparc/sparc64/memmove.S
index 8d46f2cd4e..7746684160 100644
--- a/sysdeps/sparc/sparc64/memmove.S
+++ b/sysdeps/sparc/sparc64/memmove.S
@@ -38,7 +38,7 @@ ENTRY(memmove)
 /*
  * normal, copy forwards
  */
-2:	ble	%XCC, .Ldbytecp
+2:	bleu	%XCC, .Ldbytecp
 	 andcc	%o1, 3, %o5	/* is src word aligned  */
 	bz,pn	%icc, .Laldst
 	 cmp	%o5, 2		/* is src half-word aligned  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-02 13:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-02 13:25 [glibc/release/2.36/master] sparc: Fix sparc64 memmove length comparison (BZ 31266) Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).