This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Fix assorted bounds violations
- To: law at cygnus dot com
- Subject: Re: PATCH: Fix assorted bounds violations
- From: Greg McGary <greg at mcgary dot org>
- Date: 04 Sep 2000 01:16:46 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <18038.967064298@upchuck> <ms4s447sit.fsf@mcgary.org>
Greg McGary <greg@mcgary.org> writes:
> Index: include/bounded-ptr.h
> ...
> +# define RELOCATE_POINTER(PTR, DISP) (PTR)
> +# define RELOCATE_POINTER_INCR_HIGH(PTR, DISP, INCR) (PTR)
> +# define RELOCATE_POINTER_SET_HIGH(PTR, DISP, N) (PTR)
These were wrong, and are now fixed. The broken defn's didn't
relocate, just returned the original PTR. These are good:
# define RELOCATE_POINTER(PTR, DISP) ((PTR) += (DISP))
# define RELOCATE_POINTER_INCR_HIGH(PTR, DISP, INCR) ((PTR) += (DISP))
# define RELOCATE_POINTER_SET_HIGH(PTR, DISP, LENGTH) ((PTR) += (DISP))
> Index: gcc/ginclude/bounded-ptr.h
Same change for this file.
Greg