This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: Signal handling rewrite for Linux / i386
- From: Andrew Haley <aph at cambridge dot redhat dot com>
- To: "Boehm, Hans" <hans_boehm at hp dot com>
- Cc: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>, java at gcc dot gnu dot org
- Date: Fri, 25 Jan 2002 09:43:06 +0000 (GMT)
- Subject: RE: Signal handling rewrite for Linux / i386
- References: <40700B4C02ABD5119F000090278766443BEF2A@hplex1.hpl.hp.com>
Boehm, Hans writes:
> Is there any way we can preallocate the stack overflow exception, so that it
> doesn't need to be allocated in the signal handler?
We can pre-allocate one for each thread, yes.
> There are two problems with allocating it in the signal handler:
>
> 1) Either the garbage collector needs to understand sigaltstack, or you need
> to use clever hacks in allocating the alternate stack in just the right
> place. Otherwise you could just set up SIGSEGV so that the thread stopping
> signals are disabled in the handler, and thus the collector should never see
> any of this, I think.
Does my patch not allocate the alttack in just the right place?
> 2) I suspect the alternate stack needs to be larger than you think, since
> the collector may need to run in it. If parallel collection is enabled, it
> puts its local mark stack there, among other things.
Okay.
> The linuxthreads code for pthread_self() on some platforms gets much slower
> if you use nondefault stack sizes.
Oh right; that's worth investigating. I did make sure that
pthread_self() still worked.
> Does anyone understand on what platforms that still matters? I
> believe it doesn't if you can reserve a register for the thread
> pointer.
Andrew.