Date: Wed, 20 Dec 2000 11:25:36 +0000 (GMT) From: Aled Morris <aledm@qix.co.uk> To: Matt Dillon <dillon@earth.backplane.com> Cc: Jack Rusher <jar@integratus.com>, "Jacques A. Vidrine" <n@nectar.com>, Warner Losh <imp@village.org>, hackers@FreeBSD.ORG Subject: Re: Why not another style thread? (was Re: cvs commit: src/lib/libc/gen .. Message-ID: <Pine.BSF.4.21.0012201120480.436-100000@kai.qix.co.uk> In-Reply-To: <200012181908.eBIJ8PP46165@earth.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0012201120480.436-100000>