This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Signal handling rewrite for Linux / i386


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]