Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 1997 23:05:49 -0700 (MST)
From:      Charles Mott <cmott@srv.net>
To:        Stephen McKay <syssgm@devetir.qld.gov.au>
Cc:        freebsd-chat@FreeBSD.ORG, syssgm@devetir.qld.gov.au
Subject:   Re: Trying to understand stack overflow
Message-ID:  <Pine.BSF.3.91.970213230057.7180C-100000@darkstar>
In-Reply-To: <199702140448.OAA27909@ogre.devetir.qld.gov.au>

next in thread | previous in thread | raw e-mail | index | archive | help
> The real problem here is lack of bounds checking on memory objects.  I
> remember Dennis Ritchie (hmm, or was it Ken T?) claim that he had modified
> his system C compiler so that every C pointer implied length as well as
> starting location.  Thus, every pointer and array access could be checked
> for illegitimate accesses.  The penalty is doubling the size of every pointer
> plus a run time checking cost.

Would there be any problems with code that assumes a pointer is the same 
size as a long int?

I know this sounds like a dumb question, but I have seen code that makes
this assumption (some Linux drivers -- I can't remember exactly). 

Ch



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.970213230057.7180C-100000>