Adhemerval Zanella
3daef2c8ee
Fix x86_64 memchr for large input sizes
...
Current optimized memchr for x86_64 does for input arguments pointers
module 64 in range of [49,63] if there is no searchr char in the rest
of 64-byte block a pointer addition which might overflow:
* sysdeps/x86_64/memchr.S
77 .p2align 4
78 L(unaligned_no_match):
79 add %rcx, %rdx
Add (uintptr_t)s % 16 to n in %rdx.
80 sub $16, %rdx
81 jbe L(return_null)
This patch fixes by adding a saturated math that sets a maximum pointer
value if it overflows (UINTPTR_MAX).
Checked on x86_64-linux-gnu and powerpc64-linux-gnu.
[BZ# 19387]
* sysdeps/x86_64/memchr.S (memchr): Avoid overflow in pointer
addition.
* string/test-memchr.c (do_test): Remove alignment limitation.
(test_main): Add test that trigger BZ# 19387.
2016-12-27 10:50:41 -02:00
..
2016-12-21 15:16:29 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-12-16 16:21:54 -05:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-12-26 10:08:45 +01:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-12-14 13:16:13 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-10-29 23:50:56 -04:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-04-01 18:33:03 -03:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-12-21 15:16:29 +00:00
2016-12-16 16:21:54 -05:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-04-01 10:44:45 -03:00
2016-01-04 16:05:18 +00:00
2016-12-21 15:16:29 +00:00
2016-01-04 16:05:18 +00:00
2016-04-01 18:33:03 -03:00
2016-01-04 16:05:18 +00:00
2016-12-14 15:12:18 +00:00
2016-12-14 15:12:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-12-16 16:21:54 -05:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-12-27 10:50:41 -02:00
2016-01-04 16:05:18 +00:00
2016-05-18 05:51:59 -07:00
2016-01-04 16:05:18 +00:00
2016-05-18 05:51:59 -07:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-12-16 16:21:54 -05:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-08-02 17:46:58 -07:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-08-26 14:28:46 +02:00
2016-01-25 12:44:46 +01:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2015-08-06 02:59:04 -04:00
2016-01-04 16:05:18 +00:00
2014-11-05 15:24:08 +05:30
2015-09-28 16:55:57 -04:00
2014-11-05 15:24:08 +05:30
2015-08-06 02:59:04 -04:00
2016-12-20 11:08:10 +01:00
2016-12-16 16:21:54 -05:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00