This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ports/13718] New: noinl-tester and inl-tester tests fail to pass on alpha


http://sourceware.org/bugzilla/show_bug.cgi?id=13718

             Bug #: 13718
           Summary: noinl-tester and inl-tester tests fail to pass on
                    alpha
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ports
        AssignedTo: unassigned@sourceware.org
        ReportedBy: aurelien@aurel32.net
                CC: carlos@systemhalted.org, roland@gnu.org
    Classification: Unclassified
              Host: alphaev68-unknown-linux-gnu
            Target: alphaev68-unknown-linux-gnu
             Build: alphaev68-unknown-linux-gnu


noinl-tester and inl-tester tests fail to pass on alpha with the following type
of error:

strncat flunked test 14
n1=0, n2=0, n3=2, n4=0,
buf1=61,00,00,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62

Looking more in details, the __stnxcpy implementation does not work if the n
argument equals UINT_MAX or slightly less (i.e. strcat emulation), and if the
two strings are not co-aligned.

This is due to the following code in stnxcpy.S, adding a bias to the n value
(a2), which makes it overflow.

        /* Are source and destination co-aligned?  */
        xor     a0, a1, t1      # e0    :
        and     a0, 7, t0       # .. e1 : find dest misalignment
        and     t1, 7, t1       # e0    :
        addq    a2, t0, a2      # .. e1 : bias count by dest misalignment
        subq    a2, 1, a2       # e0    :
        and     a2, 7, t2       # e1    :
        srl     a2, 3, a2       # e0    : a2 = loop counter = (count - 1)/8
        addq    zero, 1, t10    # .. e1 :
        sll     t10, t2, t10    # e0    : t10 = bitmask of last count byte
        bne     t1, $unaligned  # .. e1 :

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]