On Mon, 18 Dec 2000, Matt Dillon wrote:

>    void *
>    safe_malloc(int bytes) 
>    {
>       void *ptr;
>
>       if ((ptr = malloc(bytes)) == NULL)
>           *(int *)0 = 1;      /* force seg fault */


Shouldn't you use "kill(0, SIGSEGV)" ?

I'm sure we went through a long and painful Y2K style code clearout
eliminating the assumption that address zero could be referenced
"*(int *0) == 0" and now you are relying on the opposite assumption.

Was:  Not every machine is a VAX!
Now:  Not every machine is not a VAX!

Aled



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to