[Gc] explicit thread registration

MenTaLguY mental at rydia.net
Sat Dec 15 10:56:26 PST 2007


On Sat, 2007-12-15 at 01:11 +0000, Boehm, Hans wrote:
> >  - the ability to register the current thread (including the GC_INIT
> > thread) with an explicit base stack address, which can be
> > taken from the address of a local variable in a stack frame
> > which the application knows will be "permanent" for the
> > useful lifetime of the thread

> There is GC_call_with_stack_base, which then allows you to call
> GC_register_my_thread() from within the called function.

Excellent, but -- can it be used around GC_INIT?  The problem is that I
need to prevent all attempts to find the stack automatically.

(Specific example: valgrind rearranges the address space of the hosted
process, so that /proc/self/maps is no longer accurate.  Since libgc
uses /proc/self/maps to find the stack segments, it will crash as soon
as it tries to scan any stack whose address is obtained that way.)

-mental
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20071215/c1381254/attachment.pgp


More information about the Gc mailing list