public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug string/31266] New: sparc: string/tst-memmove-overflow fails on 32-bit sparcv9
@ 2024-01-18 15:28 adhemerval.zanella at linaro dot org
  2024-01-19  5:29 ` [Bug string/31266] " sam at gentoo dot org
  2024-01-22 13:02 ` adhemerval.zanella at linaro dot org
  0 siblings, 2 replies; 3+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2024-01-18 15:28 UTC (permalink / raw)
  To: glibc-bugs

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug string/31266] sparc: string/tst-memmove-overflow fails on 32-bit sparcv9
  2024-01-18 15:28 [Bug string/31266] New: sparc: string/tst-memmove-overflow fails on 32-bit sparcv9 adhemerval.zanella at linaro dot org
@ 2024-01-19  5:29 ` sam at gentoo dot org
  2024-01-22 13:02 ` adhemerval.zanella at linaro dot org
  1 sibling, 0 replies; 3+ messages in thread
From: sam at gentoo dot org @ 2024-01-19  5:29 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31266

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug string/31266] sparc: string/tst-memmove-overflow fails on 32-bit sparcv9
  2024-01-18 15:28 [Bug string/31266] New: sparc: string/tst-memmove-overflow fails on 32-bit sparcv9 adhemerval.zanella at linaro dot org
  2024-01-19  5:29 ` [Bug string/31266] " sam at gentoo dot org
@ 2024-01-22 13:02 ` adhemerval.zanella at linaro dot org
  1 sibling, 0 replies; 3+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2024-01-22 13:02 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31266

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |2.39

--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Fixed on 2.39.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-22 13:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-18 15:28 [Bug string/31266] New: sparc: string/tst-memmove-overflow fails on 32-bit sparcv9 adhemerval.zanella at linaro dot org
2024-01-19  5:29 ` [Bug string/31266] " sam at gentoo dot org
2024-01-22 13:02 ` adhemerval.zanella at linaro dot org

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).