Re: function pointers



"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--
.