glibc/sysdeps/i386/i686/multiarch
Adhemerval Zanella 3abeeec5f4 Fix i686 memchr overflow calculation (BZ#21182)
This patch fixes the regression added by 23d2770 for final address
overflow calculation.  The subtraction of the considered size (16)
at line 120 is at wrong place, for sizes less than 16 subsequent
overflow check will not take in consideration an invalid size (since
the subtraction will be negative).  Also, the lea instruction also
does not raise the carry flag (CF) that is used in subsequent jbe
to check for overflow.

The fix is to follow x86_64 logic from 3daef2c where the overflow
is first check and a sub instruction is issued.  In case of resulting
negative size, CF will be set by the sub instruction and a NULL
result will be returned.  The patch also add similar tests reported
in bug report.

Checked on i686-linux-gnu and x86_64-linux-gnu.

	* string/test-memchr.c (do_test): Add BZ#21182 checks for address
	near end of a page.
	* sysdeps/i386/i686/multiarch/memchr-sse2.S (__memchr): Fix
	overflow calculation.
2017-03-29 09:54:14 -03:00
..
bcopy-sse2-unaligned.S i386: memcpy functions with SSE2 unaligned load/store 2014-12-30 07:19:38 -08:00
bcopy-ssse3-rep.S
bcopy-ssse3.S
bcopy.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
bzero-sse2-rep.S
bzero-sse2.S
bzero.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ifunc-impl-list.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
locale-defines.sym
Makefile Remove x86 ifunc-defines.sym and rtld-global-offsets.sym 2016-05-11 05:51:39 -07:00
memchr-sse2-bsf.S Fix i686 memchr for large input sizes 2017-01-02 17:52:51 -02:00
memchr-sse2.S Fix i686 memchr overflow calculation (BZ#21182) 2017-03-29 09:54:14 -03:00
memchr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcmp-sse4.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcmp-ssse3.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcpy_chk.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcpy-sse2-unaligned.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcpy-ssse3-rep.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcpy-ssse3.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcpy.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memmove_chk.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memmove-sse2-unaligned.S i386: memcpy functions with SSE2 unaligned load/store 2014-12-30 07:19:38 -08:00
memmove-ssse3-rep.S
memmove-ssse3.S
memmove.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mempcpy_chk.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mempcpy-sse2-unaligned.S i386: memcpy functions with SSE2 unaligned load/store 2014-12-30 07:19:38 -08:00
mempcpy-ssse3-rep.S
mempcpy-ssse3.S
mempcpy.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memrchr-c.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
memrchr-sse2-bsf.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memrchr-sse2.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memrchr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memset_chk.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memset-sse2-rep.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memset-sse2.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memset.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
rawmemchr-sse2-bsf.S
rawmemchr-sse2.S
rawmemchr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
rtld-strnlen.c
s_fma-fma.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
s_fma.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
s_fmaf-fma.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
s_fmaf.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sched_cpucount.c
stpcpy-sse2.S
stpcpy-ssse3.S
stpcpy.S
stpncpy-sse2.S
stpncpy-ssse3.S
stpncpy.S
strcasecmp_l-c.c
strcasecmp_l-sse4.S
strcasecmp_l-ssse3.S
strcasecmp_l.S
strcasecmp-c.c
strcasecmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strcat-sse2.S Fix x86 strncat optimized implementation for large sizes 2017-01-03 14:24:53 -02:00
strcat-ssse3.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strcat.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strchr-sse2-bsf.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strchr-sse2.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strchr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strcmp-sse4.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strcmp-ssse3.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strcmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strcpy-sse2.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strcpy-ssse3.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strcpy.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strcspn-c.c
strcspn.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strlen-sse2-bsf.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strlen-sse2.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strlen.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strncase_l-c.c
strncase_l-sse4.S
strncase_l-ssse3.S
strncase_l.S
strncase-c.c
strncase.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strncat-c.c
strncat-sse2.S
strncat-ssse3.S
strncat.S
strncmp-c.c
strncmp-sse4.S
strncmp-ssse3.S
strncmp.S
strncpy-c.c
strncpy-sse2.S
strncpy-ssse3.S
strncpy.S
strnlen-c.c Use libc_hidden_proto / libc_hidden_def with __strnlen. 2015-06-02 20:24:25 +00:00
strnlen-sse2.S
strnlen.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strpbrk-c.c
strpbrk.S
strrchr-sse2-bsf.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strrchr-sse2.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strrchr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strspn-c.c
strspn.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
test-multiarch.c
varshift.c
varshift.h
wcschr-c.c powerpc: Fix __wcschr static build 2015-04-15 16:01:48 -03:00
wcschr-sse2.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wcschr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wcscmp-c.c Fix regcomp wcscoll, wcscmp namespace (bug 18497). 2015-06-09 21:07:30 +00:00
wcscmp-sse2.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wcscmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wcscpy-c.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wcscpy-ssse3.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wcscpy.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wcslen-c.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wcslen-sse2.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wcslen.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wcsrchr-c.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wcsrchr-sse2.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wcsrchr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wmemcmp-c.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wmemcmp-sse4.S
wmemcmp-ssse3.S
wmemcmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00