[Bug string/20327] New: POWER8 strcasecmp returns incorrect result
fweimer at redhat dot com
sourceware-bugzilla@sourceware.org
Mon Jul 4 14:12:00 GMT 2016
https://sourceware.org/bugzilla/show_bug.cgi?id=20327
Bug ID: 20327
Summary: POWER8 strcasecmp returns incorrect result
Product: glibc
Version: 2.24
Status: NEW
Severity: normal
Priority: P2
Component: string
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
CC: raji at linux dot vnet.ibm.com
Target Milestone: ---
Target: ppc64le. ppc64
We have received a report of a build failure of krb5
https://bugzilla.redhat.com/show_bug.cgi?id=1351737
induced by this commit:
commit c8376f3e07602aaef9cb843bb73cb5f2b860634a
Author: raji <raji@oc4354787705.ibm.com>
Date: Tue Jun 14 14:51:16 2016 +0530
powerpc: strcasecmp/strncasecmp optmization for power8
This implementation utilizes vectors to improve performance
compared to current byte by byte implementation for POWER7.
The performance improvement is upto 4x. This patch is tested
on powerpc64 and powerpc64le.
I tried to reproduce this outside the krb5 build. It does not seem to be a
simple alignment issue.
At the start of strcasecmp, the arguments are:
(gdb) print (char *)$r3
$73 = 0x3fffb7e11fd8 "des3-cbc-sha1-kd"
(gdb) print (char *)$r4
$74 = 0x4e1b02f4 "des3-cbc-sha1-kd"
The surrounding memory looks like this:
0x3fffb7e11fc8: 100 'd' 101 'e' 115 's' 51 '3' 45 '-' 104 'h' 109 'm' 97 'a'
0x3fffb7e11fd0: 99 'c' 45 '-' 115 's' 104 'h' 97 'a' 49 '1' 0 '\000'
0 '\000'
0x3fffb7e11fd8: 100 'd' 101 'e' 115 's' 51 '3' 45 '-' 99 'c' 98 'b' 99 'c'
0x3fffb7e11fe0: 45 '-' 115 's' 104 'h' 97 'a' 49 '1' 45 '-' 107 'k' 100 'd'
0x3fffb7e11fe8: 0 '\000' 0 '\000' 0 '\000' 0 '\000'
0 '\000' 0 '
\000' 0 '\000' 0 '\000'
0x3fffb7e11ff0: 84 'T' 114 'r' 105 'i' 112 'p' 108 'l' 101 'e' 32 ' ' 68 'D'
0x4e1b02e4: 105 'i' 110 'n' 115 's' 0 '\000' 33 '!' 0 '\000'
0 '\000' 0 '
\000'
0x4e1b02ec: 0 '\000' 0 '\000' 0 '\000' 0 '\000'
97 'a' 101 'e' 115
's' 0 '\000'
0x4e1b02f4: 100 'd' 101 'e' 115 's' 51 '3' 45 '-' 99 'c' 98 'b' 99 'c'
0x4e1b02fc: 45 '-' 115 's' 104 'h' 97 'a' 49 '1' 45 '-' 107 'k' 100 'd'
0x4e1b0304: 0 '\000' 57 '9' 54 '6' 0 '\000' 49 '1' 0
'\000' 0 '\000'
0 '\000'
0x4e1b030c: 0 '\000' 0 '\000' 0 '\000' 0 '\000'
18 '\022' 96
'`' -54 '\312' -86 '\252'
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list