From: Mark Biggar <biggar@gte.net>
Subject: Re: Subverting 'Access for Sub-programs
Date: 1999/08/09
Date: 1999-08-09T00:00:00+00:00 [thread overview]
Message-ID: <37AEF748.42C0E7F0@gte.net> (raw)
In-Reply-To: 7of1ju$d0m$1@nnrp1.deja.com
> After I wrote the above post, I actually did think of a simple way
> that this type of runtime check could be implemented efficiently.
> Suppose you have a subprogram P that contains nested subprograms Q1,
> Q2, etc. If Q1'ACCESS is used, the compiler allocates a global counter
> for P (Q1's parent); the access value for Q1'ACCESS would contain the
> address of P's global counter, and the current value of the counter.
> When P exits, it increments the global counter just before returning.
> Now, any access-subprogram type that has this property will have a
> counter address (possibly null) and a current counter value; so when
> dereferencing, the program would look up the pointed-to counter and see
> if its value matches the value stored in the access-subprogram type. If
> not, the dereference is illegal. (A null counter address would indicate
> a global subprogram, or perhaps any subprogram that is statically not
> deeper than the type, so that the check would be unnecessary.)
>
> P's counter would also have to be incremented when its execution is
> abandoned due to an exception; this may add a little complication in
> some implementations, but not too much. Tasking probably complicates
> things.
This scheme fails if P is recursive. Exiting recursive invocations of P
would invalidate
the function pointer even though the frame it depends on was still valid.
--
Mark Biggar
mark.a.biggar@lmco.com
next prev parent reply other threads:[~1999-08-09 0:00 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-03 0:00 Subverting 'Access for Sub-programs Anton Gibbs
1999-08-03 0:00 ` Steve Doiel
1999-08-03 0:00 ` tmoran
1999-08-03 0:00 ` Ted Dennison
1999-08-03 0:00 ` David C. Hoos, Sr.
1999-08-05 0:00 ` Robert A Duff
1999-08-03 0:00 ` Brian Rogoff
1999-08-03 0:00 ` Michael F. Yoder
1999-08-04 0:00 ` Robert Dewar
1999-08-04 0:00 ` Robert A Duff
1999-08-04 0:00 ` Robert Dewar
1999-08-04 0:00 ` Anton Gibbs
1999-08-04 0:00 ` Jean-Pierre Rosen
1999-08-04 0:00 ` Brian Rogoff
1999-08-05 0:00 ` Jean-Pierre Rosen
1999-08-05 0:00 ` adam
1999-08-05 0:00 ` Robert Dewar
1999-08-05 0:00 ` What is a Display ? (was: Subverting 'Access for Sub-programs) Larry Kilgallen
1999-08-05 0:00 ` Hyman Rosen
1999-08-06 0:00 ` Robert Dewar
1999-08-06 0:00 ` Robert Dewar
1999-08-05 0:00 ` Subverting 'Access for Sub-programs adam
1999-08-06 0:00 ` Robert A Duff
1999-08-06 0:00 ` adam
1999-08-09 0:00 ` Mark Biggar [this message]
1999-08-09 0:00 ` Robert A Duff
1999-08-05 0:00 ` Robert A Duff
1999-08-05 0:00 ` Robert Dewar
1999-08-05 0:00 ` tmoran
1999-08-06 0:00 ` Robert A Duff
1999-08-05 0:00 ` Brian Rogoff
1999-08-06 0:00 ` Robert Dewar
1999-08-09 0:00 ` Tucker Taft
1999-08-10 0:00 ` Robert Dewar
1999-08-11 0:00 ` Tucker Taft
1999-08-13 0:00 ` Robert Dewar
1999-08-13 0:00 ` Robert Dewar
1999-08-13 0:00 ` Brian Rogoff
1999-08-11 0:00 ` Robert A Duff
1999-08-11 0:00 ` Robert Dewar
1999-08-11 0:00 ` Dmitry A. Kazakov
1999-08-11 0:00 ` Robert Dewar
1999-08-12 0:00 ` Dmitry A. Kazakov
1999-08-14 0:00 ` Robert Dewar
1999-08-16 0:00 ` Dmitry A. Kazakov
1999-08-11 0:00 ` Richard D Riehle
1999-08-06 0:00 ` Brian Rogoff
1999-08-07 0:00 ` Gautier
1999-08-05 0:00 ` Robert A Duff
1999-08-05 0:00 ` Robert Dewar
1999-08-05 0:00 ` Brian Rogoff
1999-08-04 0:00 ` Robert A Duff
1999-08-04 0:00 ` Brian Rogoff
1999-08-05 0:00 ` tmoran
1999-08-05 0:00 ` Aidan Skinner
1999-08-05 0:00 ` Robert Dewar
1999-08-05 0:00 ` Ray Blaak
1999-08-06 0:00 ` Jean-Pierre Rosen
1999-08-06 0:00 ` Hyman Rosen
1999-08-07 0:00 ` Florian Weimer
1999-08-06 0:00 ` Robert Dewar
1999-08-06 0:00 ` Robert A Duff
1999-08-08 0:00 ` Brian Rogoff
1999-08-09 0:00 ` Robert A Duff
1999-08-10 0:00 ` Brian Rogoff
1999-08-09 0:00 ` Tucker Taft
1999-08-05 0:00 ` Anton Gibbs
1999-08-05 0:00 ` Steve Quinlan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox