|array bounds checking firstname.lastname@example.org (dz) (2005-11-26)|
|Re: array bounds checking email@example.com (2005-11-27)|
|Re: array bounds checking firstname.lastname@example.org (Sudesh Chandna, Noida) (2005-11-29)|
|Re: array bounds checking email@example.com (glen herrmannsfeldt) (2005-12-03)|
|Re: array bounds checking firstname.lastname@example.org (2005-12-08)|
|Re: Array bounds checking email@example.com (1990-06-15)|
|From:||firstname.lastname@example.org (Nick Maclaren)|
|Date:||27 Nov 2005 00:35:43 -0500|
|Organization:||University of Cambridge, England|
|Posted-Date:||27 Nov 2005 00:35:43 EST|
dz <email@example.com> wrote:
> I am wondering if anybody knew how array bounds checks worked when
>they are references through multiple indirections of pointers. Eg: p =
>A ; q= &p; ***q+100=0; So q is referencing A. And hence I would like
>a check inserted there.
> Do array bounds checking handle these cases, because this
>also would need pointer analysis.
If you are talking about C, array bounds checking is effectively
hopeless. If you were talking about Fortran, it is fairly easy.
>[Depends on the language and implementation. If it has "fat" pointers
>that contain type info, then the bounds can be in the pointers, or
>pointed to by fields in the pointers. -John]
The main alternative approach is to have arrays implemented as structures,
including the bounds and data pointer.
Return to the
Search the comp.compilers archives again.