diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-02-01 06:35:29 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-02-01 06:35:29 +0000 |
commit | e782a927c24430100bf2008c96cd421a70285a7e (patch) | |
tree | ca91c08070e38fa5c2c9ed085f4835eb5ab3704b /sysdeps | |
parent | 3a7ac8a0f596bb73093212cd1109c1413777e1f8 (diff) | |
download | glibc-e782a927c24430100bf2008c96cd421a70285a7e.tar.gz glibc-e782a927c24430100bf2008c96cd421a70285a7e.tar.xz glibc-e782a927c24430100bf2008c96cd421a70285a7e.zip |
Remove BOUNDED_N and BOUNDED_1.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/bp-checks.h | 10 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc32/backtrace.c | 4 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/backtrace.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/backtrace.c | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/shmat.c | 3 |
5 files changed, 3 insertions, 21 deletions
diff --git a/sysdeps/generic/bp-checks.h b/sysdeps/generic/bp-checks.h index 9bfa433b0a..cfff9155ec 100644 --- a/sysdeps/generic/bp-checks.h +++ b/sysdeps/generic/bp-checks.h @@ -66,13 +66,6 @@ extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned); /* Same as CHECK_STRING, but tolerate ARG == NULL. */ # define CHECK_STRING_NULL_OK(ARG) _CHECK_STRING ((ARG), __ptrvalue (ARG)) -/* Return a bounded pointer with value PTR that satisfies CHECK_N (PTR, N). */ -# define BOUNDED_N(PTR, N) \ - ({ __typeof (PTR) __bounded _p_; \ - __ptrvalue _p_ = __ptrlow _p_ = __ptrvalue (PTR); \ - __ptrhigh _p_ = __ptrvalue _p_ + (N); \ - _p_; }) - #else /* !__BOUNDED_POINTERS__ */ /* Do nothing if not compiling with -fbounded-pointers. */ @@ -85,10 +78,7 @@ extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned); # define CHECK_N(ARG, N) (ARG) # define CHECK_N_NULL_OK(ARG, N) (ARG) # define CHECK_STRING(ARG) (ARG) -# define BOUNDED_N(PTR, N) (PTR) #endif /* !__BOUNDED_POINTERS__ */ -#define BOUNDED_1(PTR) BOUNDED_N (PTR, 1) - #endif /* _bp_checks_h_ */ diff --git a/sysdeps/powerpc/powerpc32/backtrace.c b/sysdeps/powerpc/powerpc32/backtrace.c index b1b4b8e10d..cd04450337 100644 --- a/sysdeps/powerpc/powerpc32/backtrace.c +++ b/sysdeps/powerpc/powerpc32/backtrace.c @@ -18,7 +18,6 @@ #include <execinfo.h> #include <stddef.h> -#include <bp-checks.h> /* This is the stack layout we see with every stack frame. Note that every routine is required by the ABI to lay out the stack @@ -47,11 +46,10 @@ __backtrace (void **array, int size) /* Get the address on top-of-stack. */ asm volatile ("lwz %0,0(1)" : "=r"(current)); - current = BOUNDED_1 (current); for ( count = 0; current != NULL && count < size; - current = BOUNDED_1 (current->next), count++) + current = current->next, count++) array[count] = current->return_address; /* It's possible the second-last stack frame can't return diff --git a/sysdeps/powerpc/powerpc64/backtrace.c b/sysdeps/powerpc/powerpc64/backtrace.c index b52bb1492b..ca04a6f9cf 100644 --- a/sysdeps/powerpc/powerpc64/backtrace.c +++ b/sysdeps/powerpc/powerpc64/backtrace.c @@ -18,7 +18,6 @@ #include <execinfo.h> #include <stddef.h> -#include <bp-checks.h> /* This is the stack layout we see with every stack frame. Note that every routine is required by the ABI to lay out the stack @@ -50,11 +49,10 @@ __backtrace (void **array, int size) /* Get the address on top-of-stack. */ asm volatile ("ld %0,0(1)" : "=r"(current)); - current = BOUNDED_1 (current); for ( count = 0; current != NULL && count < size; - current = BOUNDED_1 (current->next), count++) + current = current->next, count++) array[count] = current->return_address; /* It's possible the second-last stack frame can't return diff --git a/sysdeps/sparc/backtrace.c b/sysdeps/sparc/backtrace.c index 89f976b06c..a0ba1fdfd7 100644 --- a/sysdeps/sparc/backtrace.c +++ b/sysdeps/sparc/backtrace.c @@ -19,7 +19,6 @@ #include <execinfo.h> #include <stddef.h> -#include <bp-checks.h> #include <sysdep.h> #include <sys/trap.h> #include <dlfcn.h> @@ -129,7 +128,6 @@ __backtrace (void **array, int size) asm volatile ("mov %%fp, %0" : "=r"(fp)); asm volatile ("mov %%i7, %0" : "=r"(i7)); current = (struct layout *__unbounded) (fp + BACKTRACE_STACK_BIAS); - current = BOUNDED_1 (current); array[0] = (void *__unbounded) i7; @@ -144,7 +142,6 @@ __backtrace (void **array, int size) break; current = (struct layout *__unbounded) (current->next + BACKTRACE_STACK_BIAS); - current = BOUNDED_1 (current); } } else diff --git a/sysdeps/unix/sysv/linux/shmat.c b/sysdeps/unix/sysv/linux/shmat.c index cb5aa50bd1..91d9443767 100644 --- a/sysdeps/unix/sysv/linux/shmat.c +++ b/sysdeps/unix/sysv/linux/shmat.c @@ -23,7 +23,6 @@ #include <sysdep.h> #include <unistd.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Attach the shared memory segment associated with SHMID to the data segment of the calling process. SHMADDR and SHMFLG determine how @@ -58,5 +57,5 @@ shmat (shmid, shmaddr, shmflg) return (void *) -1l; } - return BOUNDED_N (raddr, length); + return raddr; } |