Kazimir and Steve,

The bug found by Kazimir's program is a C stack overflow.  The stack size
at the crashpoint is almost exactly the stack size as reported by the
getrlimit() system call, and calling setrlimit() to raise the C stack size
pushes the crash away indefinitely.  On some systems (UNIXes) you can raise
the limits from the shell, but others would need to compile a larger
stack size into the virtual machine to solve this issue.

I used to think Linux and other UNIXes automatically grew their C stacks as
needed, but I guess they have a limit in order to keep runaway processes
from bringing the whole system to a grinding halt.  The number on my Linux
seems to be 8.3MB by default but can be raised by an ordinary system call.
On Windows I believe we have been using a relatively puny 768K C stack,
and I am not sure whether the Ming gcc on Windows supports setrlimit()
to raise the limit dynamically, or not; I will find out.

I believe a "fix" will now be relatively straightforward; thanks again
Kazimir for packaging the problem up so nicely!

The good news about all this is that for many years we have just been
shrugging our shoulders and saying "C stack overflow, can't help it", about
most reported Icon and Unicon virtual machine crashes. But from this
exercise it appears that we can do something to alleviate this on many
or most platforms.

Like the BLKSIZE discussion earlier, one of the big issues is how to
select an appropriate C stack size, based on the system memory, such
that users don't need environment variables or flags to set it to a
non-default value.

Cheers,
Clint


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to