|
![](/i/fill.gif) |
A good program should never crash, no matter what's the input. If the
input is illegal, a good program issues an error message saying clearly
what's the problem.
Now, povray fails on this in some cases:
- The documentation says that you can make at most 10 nested #includes
(ie. include files which include files which include files and so on).
This is acceptable. What is not acceptable is that when you exceed the
limit, povray crashes (or at least the dos version does). It should
output an error message like "maximum number of nested include files
reached" instead and exit normally.
- There seems to be also a maximum number of recursive macro calls you can
make. Also ok, but again povray crashes when it's reached. It should
issue an error message like "maximum macro recursion limit reached"
instead.
- At least in the dos and the windows versions there seems to be a stack
overflow problem when a too big max_trace_level is specified which makes
povray to crash. Since those versions are compiled with watcom, I think
it shouldn't be a bad idea to enable the stack overflow checking when
compiling. This way, when the stack overflows, the program issues the
error "Stack overflow" instead of crashing.
Also a bigger stack is a must. Say, something like 128k instead of the
default 8k which watcom makes.
--
main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp. -*/
Post a reply to this message
|
![](/i/fill.gif) |