Signal handling rewrite for Linux / i386

Bryce McKinlay bryce@waitaki.otago.ac.nz
Tue Jan 22 20:54:00 GMT 2002


Andrew Haley wrote:

>> Don't we lose something by circumventing the kernel's
> > variable-size/floating stack feature?
>
>I don't think so.  If we're going to detect stack overflow, and the
>JLS says we must, we need to have some fixed limit.  Inevitably any
>such limit will be rather arbitrary.
>

Have you considered the pthread_getattr_np()? This was apparantly added 
specifically to support the JVMs and gives you the stack size and 
location for a running thread including the size of the guard pages. I 
guess we'd still need the sigaltstack stuff, but should be able to avoid 
mapping our own stack explicitly? It should also be possible to just 
figure out if the fault address was within the guard pages that were set 
by linuxthreads?

regards

Bryce.




More information about the Java mailing list