public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug string/28024] New: s390(31bit): Wrong result of memchr (MEMCHR_Z900_G5) with n >= 0x80000000
@ 2021-06-29 9:27 stli at linux dot ibm.com
2021-07-01 14:56 ` [Bug string/28024] " stli at linux dot ibm.com
0 siblings, 1 reply; 2+ messages in thread
From: stli at linux dot ibm.com @ 2021-06-29 9:27 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28024
Bug ID: 28024
Summary: s390(31bit): Wrong result of memchr (MEMCHR_Z900_G5)
with n >= 0x80000000
Product: glibc
Version: 2.34
Status: NEW
Severity: normal
Priority: P2
Component: string
Assignee: unassigned at sourceware dot org
Reporter: stli at linux dot ibm.com
Target Milestone: ---
Starting with commit "String: Add overflow tests for strnlen, memchr, and
strncat [BZ #27974]"
(https://sourceware.org/git/?p=glibc.git;a=commit;h=da5a6fba0febbfc90896ce1b2eb75c6d8a88a72d),
the testcase string/test-memchr reports wrong results in MEMCHR_Z900_G5
ifunc-variant on s390(31bit):
string/test-memchr: Wrong result in function MEMCHR_Z900_G5 (0x7ddc7000, 255,
2147483648) -> (nil) != 0x7ddc7000
string/test-memchr: Wrong result in function MEMCHR_Z900_G5 (0x7ddc7000, 255,
2147483648) -> (nil) != 0x7ddc7000
string/test-memchr: Wrong result in function MEMCHR_Z900_G5 (0x7ddc7000, 255,
2147483649) -> (nil) != 0x7ddc7001
....
On s390 (31bit), the pointer to the first byte after s always wraps around with
n >= 0x80000000 and can lead to stop searching before end of s. Therefore
memchr returns NULL instead of the pointer to the first occurence of c.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug string/28024] s390(31bit): Wrong result of memchr (MEMCHR_Z900_G5) with n >= 0x80000000
2021-06-29 9:27 [Bug string/28024] New: s390(31bit): Wrong result of memchr (MEMCHR_Z900_G5) with n >= 0x80000000 stli at linux dot ibm.com
@ 2021-07-01 14:56 ` stli at linux dot ibm.com
0 siblings, 0 replies; 2+ messages in thread
From: stli at linux dot ibm.com @ 2021-07-01 14:56 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28024
Stefan Liebler <stli at linux dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |2.34
Status|NEW |RESOLVED
--- Comment #1 from Stefan Liebler <stli at linux dot ibm.com> ---
Fixed with commit "s390: Fix MEMCHR_Z900_G5 ifunc-variant if n>=0x80000000 [BZ
#28024]"
https://sourceware.org/git/?p=glibc.git;a=commit;h=7c45df18e1c524775a88c1e6fc7eac0049b3de83
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-01 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 9:27 [Bug string/28024] New: s390(31bit): Wrong result of memchr (MEMCHR_Z900_G5) with n >= 0x80000000 stli at linux dot ibm.com
2021-07-01 14:56 ` [Bug string/28024] " stli at linux dot ibm.com
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).