glibc/sysdeps/powerpc
Adhemerval Zanella b224637928 Fix powerpc64/power7 memchr for large input sizes
Current optimized powercp64/power7 memchr uses a strategy to check for
p versus align(p+n) (where 'p' is the input char pointer and n the
maximum size to check for the byte) without taking care for possible
overflow on the pointer addition in case of large 'n'.

It was triggered by 3038145ca2 where default rawmemchr (used to
created ppc64 rawmemchr in ifunc selection) now uses memchr (p, c, (size_t)-1)
on its implementation.

This patch fixes it by implement a satured addition where overflows
sets the maximum pointer size to UINTPTR_MAX.

Checked on powerpc64le-linux-gnu.

	[BZ# 20971]
	* sysdeps/powerpc/powerpc64/power7/memchr.S (__memchr): Avoid
	overflow in pointer addition.
	* string/test-memchr.c (do_test): Add an argument to pass as
	the size on memchr.
	(test_main): Add check for SIZE_MAX.
2016-12-16 11:30:20 -02:00
..
bits Refactor long double information into bits/long-double.h. 2016-12-14 18:27:56 +00:00
fpu Fix powerpc fmax, fmin sNaN handling (bug 20947). 2016-12-15 00:43:16 +00:00
nofpu Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
nptl Remove cached PID/TID in clone 2016-11-24 19:38:51 -02:00
power4
power5+/fpu
power6
power7/fpu
powerpc32 powerpc: Add hidden definition for __sigsetjmp 2016-11-29 10:16:35 +01:00
powerpc64 Fix powerpc64/power7 memchr for large input sizes 2016-12-16 11:30:20 -02:00
soft-fp
sys/platform
abort-instr.h
atomic-machine.h
dl-procinfo.c powerpc: remove _dl_platform_string and _dl_powerpc_platforms 2016-12-13 10:15:09 +01:00
dl-procinfo.h powerpc: remove _dl_platform_string and _dl_powerpc_platforms 2016-12-13 10:15:09 +01:00
dl-tls.c
dl-tls.h
ffs.c
fpu_control.h
gccframe.h
hwcapinfo.c
hwcapinfo.h
ifunc-sel.h
Implies
jmpbuf-offsets.h
jmpbuf-unwind.h
ldsodefs.h
libc-tls.c
locale-defines.sym
longjmp.c
machine-gmon.h
Makefile
math-tests.h
memusage.h
mp_clz_tab.c
novmx-longjmp.c
novmx-sigjmp.c
novmxsetjmp.h
preconfigure
rtld-global-offsets.sym
sched_cpucount.c
sigjmp.c
sotruss-lib.c
stackinfo.h
strcat.c
sysdep.h
test-arith.c
test-arithf.c
test-get_hwcap-static.c
test-get_hwcap.c
test-gettimebase.c
tls-macros.h
tst-stack-align.h
tst-tlsopt-powerpc.c
Versions