Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] C puzzle



On Tue, Jul 30, 2002 at 11:29:45AM -0400, Viktor Pavlenko wrote:
> 
> What about the one which always crashes?
>
> The following program contains 25 characters, uses no library
> functions and segfaults when run:
>
> main(){((void(*)())0)();}

echo 'main(){main();}' > f.c ; gcc -o f f.c ; ./f ; rm f.c f

Sooner or later it *should* get out of stack space, shouldn't it? ;-)

Ciao
 David


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links