| delorie.com/archives/browse.cgi | search |
| Date: | Mon, 30 Aug 1999 09:43:03 +0300 (IDT) |
| From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
| X-Sender: | eliz AT is |
| To: | Dave Bird <dave AT xemu DOT demon DOT co DOT uk> |
| cc: | djgpp AT delorie DOT com |
| Subject: | Re: Error General Fault Protection on quit??? |
| In-Reply-To: | <$QodhXALbXy3EwjC@xemu.demon.co.uk> |
| Message-ID: | <Pine.SUN.3.91.990830094206.3558B-100000@is> |
| MIME-Version: | 1.0 |
| Reply-To: | djgpp AT delorie DOT com |
| X-Mailing-List: | djgpp AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
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 ();
}
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |