Date: Mon, 30 Aug 1999 09:43:03 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Dave Bird cc: djgpp AT delorie DOT com Subject: Re: Error General Fault Protection on quit??? In-Reply-To: <$QodhXALbXy3EwjC@xemu.demon.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sun, 29 Aug 1999, Dave Bird wrote: > I don't know whether it is possible to right a function which > tests for an invalid pointer without bombing. How about this (UNTESTED)? void validate_or_die (void *ptr) { if ( (unsigned)p < 0x1000) abort (); }