[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Efficient Gensym Hack (v2)

From: Mark H Weaver
Subject: Re: [PATCH] Efficient Gensym Hack (v2)
Date: Wed, 07 Mar 2012 14:28:33 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Andy Wingo <address@hidden> writes:

>> The good news is that it should be possible to fix this (pre-existing)
>> class of problems for 'symbols_lock' in stable-2.0 by changing
>> 'symbol_lookup_assoc_fn' to avoid allocation.
> That's not enough.  Adding spine segments, ribs, and associating a
> disappearing link all allocate memory, and those are internal to the
> hash table implementation.

Ouch.  Good point.

> Maybe it's good enough to document this defect in 2.0.  "Don't try to
> string->symbol or symbol->string in a finalizer".

I'd guess that 'symbol->string' is relatively unlikely to happen in a
finalizer (though certainly possible).  Calls to 'scm_from_*_symbol', on
the other hand, are extremely common in C code that uses Guile.  This
seems to me a rather serious heisenbug that users are likely to hit.

Would it be possible to fix stable-2.0 to run finalizers in a separate


reply via email to

[Prev in Thread] Current Thread [Next in Thread]