Re[2]: [Gc] implement GC_get_stack_base by thr_stksegment in solaris

Ivan Maidanski ivmai at mail.ru
Tue Apr 13 22:15:17 PDT 2010


Wed, 14 Apr 2010 00:43:48 +0100 Louis Zhuang <louis.zhuang at acm.org>:

> On 13 April 2010 22:30, Boehm, Hans <hans.boehm at hp.com> wrote:
> >> From: Ivan Maidanski
> >> Sent: Saturday, April 10, 2010 6:17 AM
> >> To: Louis Zhuang
> >> Cc: gc at napali.hpl.hp.com
> >> Subject: Re: [Gc] implement GC_get_stack_base by
> >> thr_stksegment in solaris
> >>
> >> Fri, 9 Apr 2010 15:33:05 +0000 (UTC) Louis Zhuang
> >> <louis.zhuang at acm.org>:
> >>
> >> > Hi, I think solaris specific thr_stksegment is the better API to
> >> > implement GC_get_stack_base, which avoids worrying SIGSEV from
> >> > find_limit(). Please review following patch.
> >>
> >> The idea looks good. But the implementation is not so easy.
> >> Due to the thr_stksegment bug,
> > I'm not sure I understand this? Which bug?

I meant HotSpot bug 4352906. It's unclear how ss_sp value is trashed (and who really does this) after the first call. See:
http://www.google.com/codesearch/p?hl=en#aRIt9pqzOVI/src/os/solaris/vm/os_solaris.hpp&q=thr_stksegment&sa=N&cd=2&ct=rc

On the other hand, implementing the workaround complicates the code - it would require LOCK and GC_lookup_thread() which could return null (since get_main_stack_base is called before GC_thr_init).

> >
> > I agree with the other comments, and that this patch looks potentially useful.
> >
> > Hans
> >
> Sorry for late. I've tested in my solaris 10 box, thr_stksement works
> fine in repeated calls. Are you are referring an old bug? I can not
> access cvs behind firm firewall so i'll submit patch againt 7.2-alpha4
> tomorrow, hopefully it is not too out-of-date to be applied...

You could fetch os_dep.c from:
http://bdwgc.cvs.sourceforge.net/viewvc/*checkout*/bdwgc/bdwgc/os_dep.c

> 
> Cheers, Louis



More information about the Gc mailing list