glibc/sysdeps/ia64
Adhemerval Zanella 3bb1ef58b9 ia64: Fix memchr for large input sizes (BZ #22603)
Current optimized ia64 memchr uses a strategy to check for last address
by adding the input one with expected size.  However it does not take
care for possible overflow.

It was triggered by 3038145ca2 where default rawmemchr now uses memchr
(p, c, (size_t)-1).

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

Checked on ia64-linux-gnu where it fixes both stratcliff and
test-rawmemchr failures.

	Adhemerval Zanella  <adhemerval.zanella@linaro.org>
	James Clarke <jrtc27@jrtc27.com>

	[BZ #22603]
	* sysdeps/ia64/memchr.S (__memchr): Avoid overflow in pointer
	addition.
2017-12-19 12:02:36 -02:00
..
bits Add _Float64x function aliases. 2017-11-27 14:16:47 +00:00
fpu Update IA64 libm-test-ulps 2017-12-12 16:57:41 -02:00
nptl nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 09:48:41 -02:00
_mcount.S
abort-instr.h
atomic-machine.h
backtrace.c
bcopy.S
bzero.S
configure
configure.ac
crti.S
crtn.S
dl-dtprocnum.h
dl-fptr.h
dl-lookupcfg.h
dl-machine.h ld.so: Replace (&bootstrap_map) with BOOTSTRAP_MAP 2017-10-03 01:55:12 -07:00
dl-sysdep.h
dl-tls.h
dl-trampoline.S
entry.h
float128-abi.h
gccframe.h
hp-timing.h
htonl.S
htons.S
ia64libgcc.S
ieee754.h
Implies
jmpbuf-unwind.h
ldbl2mpn.c
ldsodefs.h
libc-tls.c
linkmap.h
machine-gmon.h
Makeconfig Add _Float64x function aliases. 2017-11-27 14:16:47 +00:00
Makefile
math-tests.h
memccpy.S
memchr.S ia64: Fix memchr for large input sizes (BZ #22603) 2017-12-19 12:02:36 -02:00
memcmp.S
memcpy.S
memmove.S
memset.S
memusage.h
sched_cpucount.c
softpipe.h
sotruss-lib.c
stackguard-macros.h
stackinfo.h Fix ia64 executable stack default (bug 22156). 2017-09-26 16:30:46 +00:00
start.S
strchr.S
strcmp.S
strcpy.S
strlen.S
strncmp.S
strncpy.S
sysdep.h
tininess.h
tls-macros.h
tst-audit.h
Versions