diff options
author | CoprDistGit <infra@openeuler.org> | 2024-10-09 03:36:26 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-10-09 03:36:26 +0000 |
commit | db43dfdfa8bc2b938582aef3d87e43594c13ee50 (patch) | |
tree | 47b95b2f6ac8d8b7e6fa373a5bd7d661bf7234df /sparc-Fix-sparc64-memmove-length-comparison-BZ-31266.patch | |
parent | b933872de72b006230559f77acc3ccfb38a1f343 (diff) |
automatic import of glibcopeneuler20.03
Diffstat (limited to 'sparc-Fix-sparc64-memmove-length-comparison-BZ-31266.patch')
-rw-r--r-- | sparc-Fix-sparc64-memmove-length-comparison-BZ-31266.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sparc-Fix-sparc64-memmove-length-comparison-BZ-31266.patch b/sparc-Fix-sparc64-memmove-length-comparison-BZ-31266.patch new file mode 100644 index 0000000..a74f672 --- /dev/null +++ b/sparc-Fix-sparc64-memmove-length-comparison-BZ-31266.patch @@ -0,0 +1,32 @@ +From aac57faf5425b472a72132b09f4b3a2aa1f77a63 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella <adhemerval.zanella@linaro.org> +Date: Thu, 18 Jan 2024 10:52:18 -0300 +Subject: [PATCH 5/6] 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) +--- + 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 db6f4f0e84..62b19ebc1b 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 */ +-- +2.33.0 + |