Re: [Lit.] Buffer overruns

From: Phil Carmody (thefatphil_demunged_at_yahoo.co.uk)
Date: 01/19/05


Date: 19 Jan 2005 12:08:53 +0200

newstome@comcast.net writes:
> Phil Carmody <thefatphil_demunged@yahoo.co.uk> wrote:
> > newstome@comcast.net writes:
> >
> >> Douglas A. Gwyn <DAGwyn@null.net> wrote:
> >> >David Wagner wrote:
> >> >> Douglas A. Gwyn wrote:
> >> >> Depends on what you mean by "corrected". Certainly if you are using
> >> >> GC such a bug should never cause the system to run amok. If you are
> >> >> not using GC, such a bug could easily cause the system to run amok.
> >> >
> >> > That's quite wrong. Just because some allocated storage
> >> > has been reclaimed by a garbage collector does not mean
> >> > that a dangling pointer to it becomes safe to dereference.
> >>
> >> Huh? Using a system with garbage collection, it is impossible to such
> >> a "dangling pointer"... If there's a "pointer to it", it will not be
> >> reclaimed.
> >
> > Even with Knuth's XOR-ed doubly-linked lists?
>
> In a language that supports garbage collection, with type-safe
> handling of pointers, you can't do integer operations (like XOR) on
> pointers. In other words, you couldn't implement XORed doubly-linked
> lists, so that's not an issue.

Type-safe and GC are orthogonal issues. GC was mentioned by each and every
poster quoted above, but type-safeness wasn't. I thus assumed that the
pertinant language feature was GC, not type-safeness. Weird, eh?

Phil

-- 
The answer to life's mystery is simple and direct:
Sex and death.  -- Ian 'Lemmy' Kilminster.


Relevant Pages

  • Re: [Lit.] Buffer overruns
    ... >about applying a type system which helps cooperative programmers detect ... rather than as a definition of what it means to call a language type-safe. ... The programming language community is very consistent about what they mean ...
    (sci.crypt)
  • Re: heeeeeeeeeeeeeeeellllllllllllllppppppppppppppppppppp
    ... Ada-class languages aren't bad, although they lack a lot of good OO capabilities; ... language with Ada's strong type-checking would be good. ... and wrote a really wonderful storage allocator that belied the observation ... In the type-safe allocator, this wouldn't even compile...) ...
    (microsoft.public.vc.mfc)
  • Re: [Lit.] Buffer overruns
    ... if any reader happens to have a literature ... >reference to post. ... > the use of pointers. ... the Cyclone project, another type-safe version of C, is at ...
    (sci.crypt)
  • Re: porting from C++Builder
    ... don't really know what pet language you're talking about, ... Function pointers are type-safe, don't know what makes you think otherwise. ... just syntactic sugar for local types. ...
    (microsoft.public.dotnet.languages.vc)