diff options
Diffstat (limited to 'sysdeps/generic/bp-checks.h')
-rw-r--r-- | sysdeps/generic/bp-checks.h | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/sysdeps/generic/bp-checks.h b/sysdeps/generic/bp-checks.h index cfff9155ec..13d00caf48 100644 --- a/sysdeps/generic/bp-checks.h +++ b/sysdeps/generic/bp-checks.h @@ -41,16 +41,6 @@ && BOUNDS_VIOLATED), \ __ptrvalue (ARG)) -extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned); - -# define _CHECK_STRING(ARG, COND) \ - (((COND) \ - && (__ptrvalue (ARG) < __ptrlow (ARG) \ - || !__ubp_memchr (__ptrvalue (ARG), '\0', \ - (__ptrhigh (ARG) - __ptrvalue (ARG)))) \ - && BOUNDS_VIOLATED), \ - __ptrvalue (ARG)) - /* Check bounds of a pointer seated to an array of N objects. */ # define CHECK_N(ARG, N) _CHECK_N ((ARG), (N), 1) /* Same as CHECK_N, but tolerate ARG == NULL. */ @@ -61,11 +51,6 @@ extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned); /* Same as CHECK_1, but tolerate ARG == NULL. */ # define CHECK_1_NULL_OK(ARG) CHECK_N_NULL_OK ((ARG), 1) -/* Check for NUL-terminator within string's bounds. */ -# define CHECK_STRING(ARG) _CHECK_STRING ((ARG), 1) -/* Same as CHECK_STRING, but tolerate ARG == NULL. */ -# define CHECK_STRING_NULL_OK(ARG) _CHECK_STRING ((ARG), __ptrvalue (ARG)) - #else /* !__BOUNDED_POINTERS__ */ /* Do nothing if not compiling with -fbounded-pointers. */ @@ -77,7 +62,6 @@ extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned); # define CHECK_1_NULL_OK(ARG) (ARG) # define CHECK_N(ARG, N) (ARG) # define CHECK_N_NULL_OK(ARG, N) (ARG) -# define CHECK_STRING(ARG) (ARG) #endif /* !__BOUNDED_POINTERS__ */ |