Skip to content
Commit f4419b0d authored by Stefan Liebler's avatar Stefan Liebler
Browse files

S390: Fix handling of needles crossing a page in strstr z15 ifunc-variant. [BZ #25226]

If the specified needle crosses a page-boundary, the s390-z15 ifunc variant of
strstr truncates the needle which results in invalid results.

This is fixed by loading the needle beyond the page boundary to v18 instead of v16.
The bug is sometimes observable in test-strstr.c in check1 and check2 as the
haystack and needle is stored on stack. Thus the needle can be on a page boundary.

check2 is now extended to test haystack / needles located on stack, at end of page
and on two pages.

This bug was introduced with commit 6f47401b
("S390: Add arch13 strstr ifunc variant.") and is already released in glibc 2.30.

(cherry picked from commit bfdb7314)
parent 37c90e11
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment