[Bug string/31266] New: sparc: string/tst-memmove-overflow fails on 32-bit sparcv9
adhemerval.zanella at linaro dot org
sourceware-bugzilla@sourceware.org
Thu Jan 18 15:28:06 GMT 2024
https://sourceware.org/bugzilla/show_bug.cgi?id=31266
Bug ID: 31266
Summary: sparc: string/tst-memmove-overflow fails on 32-bit
sparcv9
Product: glibc
Version: 2.27
Status: NEW
Severity: normal
Priority: P2
Component: string
Assignee: unassigned at sourceware dot org
Reporter: adhemerval.zanella at linaro dot org
Target Milestone: ---
The sparcv9 uses the generic sparc64 sysdeps/sparc/sparc64/memmove.S
implementation and the initial size test is done with a signed comparison:
ENTRY(memmove)
mov %o0, %g2 /* Save pointer to destination */
cmp %o1, %o0 /* if from address is >= to use forward copy
*/
bgeu,a %XCC, 2f /* else use backward if ... */
cmp %o2, 17 /* delay slot, for small counts copy bytes */
sub %o0, %o1, %o4 /* get difference of two addresses */
cmp %o2, %o4 /* compare size and difference of addresses */
bgu %XCC, .Lovbc /* if size is bigger, have to do overlapped
copy */
cmp %o2, 17 /* delay slot, for small counts copy bytes */
/*
* normal, copy forwards
*/
2: ble %XCC, .Ldbytecp
andcc %o1, 3, %o5 /* is src word aligned */
Where it should be a 'bleu' due the buffer length being a size_t.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list