diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-01-18 10:52:18 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-01-22 09:34:50 -0300 |
commit | 926a4bdbb5fc8955570208b5571b2d04c6ffbd1d (patch) | |
tree | 888d095618e17680113e9b696466ce44a7baca0a /sysdeps/sparc | |
parent | 369efd817780276dbe0ecf8be6e1f354bdbc9857 (diff) | |
download | glibc-926a4bdbb5fc8955570208b5571b2d04c6ffbd1d.zip glibc-926a4bdbb5fc8955570208b5571b2d04c6ffbd1d.tar.gz glibc-926a4bdbb5fc8955570208b5571b2d04c6ffbd1d.tar.bz2 |
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.
Diffstat (limited to 'sysdeps/sparc')
-rw-r--r-- | sysdeps/sparc/sparc64/memmove.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/sparc/sparc64/memmove.S b/sysdeps/sparc/sparc64/memmove.S index 8803a03..f14b09a 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 */ |