Date: Fri, 20 Jun 1997 09:01:29 -0700 From: Bill Currie Subject: Re: Possible misbehavior of write To: Charles Sandmann Cc: DJ Delorie , djgpp-workers AT delorie DOT com Reply-to: billc AT blackmagic DOT tait DOT co DOT nz Message-id: <33AAA959.189C@blackmagic.tait.co.nz> Organization: Tait Electronics NZ MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit References: <9706191558 DOT AA14263 AT clio DOT rice DOT edu> Precedence: bulk Charles Sandmann wrote: > > Other possibilities > #define _djbadptr(ptr) 0 > #define _djbadptr(ptr) ((ptr < 0x10a8) || ptr > sbrk(0)) > extern int _djbadptr(); All of the above, depending on a define? That way the programmer has control over the level of `protection'. The first one for production release, the second and third for varouse levels of paranoia during developement. I take it `extern int _djbadptr();' is meant to do all the sophisticated checking Charles proposed earlier. The only hastle I can see is the need to distribute multiple libraries or answere a lot of question relating to code size/how to get debug code etc. Bill -- Leave others their otherness.