Re: [Gc] Bug: GC_get_stack_base does not acquire allocator lock

Ivan Maidanski ivmai at
Fri Mar 5 06:51:13 PST 2010

Thu, 4 Mar 2010 17:55:25 +0100 письмо от Burkhard Linke <blinke at>:

> GC_get_stack_base under Solaris (and probably every other OS that uses the 
> GC_find_limit() based implementation) does not acquire the allocator lock. If 
> libgc is built with assertions enabled applications fail if they start a 
> thread using the GC start wrapper or call GC_get_stack_base on their own 
> (e.g. mono).
> The attached patch adds the missing LOCK() and UNLOCK() statements to the 
> function in question.
> Burkhard
> ATTACHMENT: text/x-diff (stack_base_lock.diff)

Fixed. (All other GC_find_limit_...() invocations are either already called with the lock or called only once at GC_init).


More information about the Gc mailing list