Re: function pointers
- From: Michal Nazarewicz <mina86@xxxxxxx>
- Date: Mon, 07 Jan 2008 10:40:01 +0100
"cr88192" <cr88192@xxxxxxxxxxx> writes:
there are different ways to invoke crashes, but the one I typically use is
this:
*(int *)-1=-1;
How about:
#define CRASH do { \
fprintf(stderr, "%s: %d: going to crash\n", __FILE__, __LINE__); \
*(int*)-1 = 42; \
} while (0)
--
Best regards, _ _
.o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +--<mina86*tlen.pl>--<jid:mina86*jabber.org>--ooO--(_)--Ooo--
.
- Follow-Ups:
- Re: function pointers
- From: cr88192
- Re: function pointers
- References:
- function pointers
- From: hifrnds007
- Re: function pointers
- From: Tomás Ó hÉilidhe
- Re: function pointers
- From: Michal Nazarewicz
- Re: function pointers
- From: Tomás Ó hÉilidhe
- Re: function pointers
- From: Ark Khasin
- Re: function pointers
- From: cr88192
- function pointers
- Prev by Date: Re: function pointers
- Next by Date: Re: miscompilation of volatiles?
- Previous by thread: Re: function pointers
- Next by thread: Re: function pointers
- Index(es):