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-15 23:52:18 +00:00
2016-07-01 06:03:05 -07:00
2016-11-24 19:38:51 -02:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-03-03 09:53:49 -08: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-07-01 06:03:05 -07:00
2016-07-01 06:03:05 -07:00
2016-03-04 16:15:41 -08: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-28 09:12:15 -07:00
2016-01-04 16:05:18 +00:00
2016-06-20 14:31:40 +02:00
2016-01-04 16:05:18 +00:00
2016-07-12 06:30:08 -07:00
2016-09-06 08:51:07 -07:00
2016-09-06 08:51:07 -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-12-26 10:08:41 +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-11-30 16:23:58 +01:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-12-21 12:04:12 +01:00
2016-12-27 10:50:41 -02:00
2016-01-04 16:05:18 +00:00
2016-06-09 04:38:34 -07:00
2016-11-24 16:56:26 +01:00
2016-06-08 13:58:08 -07:00
2016-06-08 13:58:08 -07:00
2016-06-08 13:58:08 -07:00
2016-01-04 16:05:18 +00:00
2016-06-08 13:58:08 -07:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-06-08 13:56:14 -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-03-01 16:58:07 -08:00
2016-01-04 16:05:18 +00:00
2016-06-09 04:43:31 -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-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-01-04 16:05:18 +00:00
2016-11-28 09:45:07 -08:00
2016-01-04 16:05:18 +00:00
2016-03-07 16:00:25 +01:00
2016-03-07 16:00:25 +01:00
2015-07-15 15:10:23 +05:30
2016-03-08 12:32:59 -08:00
2016-03-25 11:11:42 +01:00
2016-01-04 16:05:18 +00:00
2015-07-07 06:09:29 -07:00
2015-07-07 06:09:29 -07:00
2015-07-07 06:09:29 -07:00
2015-07-07 06:09:29 -07:00
2015-07-07 06:09:29 -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
2015-08-19 05:37:01 -07:00
2015-08-19 05:37:01 -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-06-09 04:38:34 -07:00