Re: [Lit.] Buffer overruns

From: Xcott Craver (caj_at_B-r-a-i-n-H-z.com)
Date: 12/21/04


Date: Tue, 21 Dec 2004 10:01:13 GMT

Xcott Craver <caj@B-r-a-i-n-H-z.com> wrote:
>
>IIRC, pointers are still allowed, but not pointer arithmetic, or
>pointer casting. Popcorn also has some of the good elements from ML,
>such as tuples, e.g. *(int, char[20]) foo = new (305,"John Smith")
>and parametric datatypes.
>
>Also: the Cyclone project, another type-safe version of C, is at
>http://www.research.att.com/projects/cyclone/
 
     I posted too soon. Cyclone is a later version of popcorn.
     Cyclone has a compiler for Cygwin, so I might give it a try.
     I flippin' hate Cygwin, but I have it installed anyway.
 
     From the paper, Cyclone deals with the pointer problem with
     different flavors of pointers. Pointers of the form *foo
     are NULL-checked before they are dereferenced, with a
     corresponding performance penalty. But, you can declare
     a "never-NULL" pointer @foo, which will not incur any null-
     checks once it is assigned. Pointer arithmetic is allowed
     for a third flavor of pointer, ?foo, which carries size data.
 
> --X