emacs-devel
[Top][All Lists]
Advanced

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

Re: GC crashes


From: Stefan Monnier
Subject: Re: GC crashes
Date: 04 Dec 2003 10:48:21 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> I've just found one fact about a weak hash table.
> Even if composite.c makes a weak hash table in
> syms_of_composite (thus it is stored in Vweak_hash_tables
> and dumped), Vweak_hash_tables is intialized to Qnil in
> init_fns () at Emacs startup time.

Ha!  That's a bug.

> Does it mean that we should not dump a weak hash table?

No, it just means we have to change init_fns.

> Do you think it relates to the current problem?

Sounds likely.  IIUC the above problem means that the mark phase of the GC
will (correctly) not look at the hash-table's elements (because the table is
marked as weak), but the elements that get GC'd will not be properly removed
from the table because that is done via Vweak_hash_tables.  I.e. the hash
table will end up with dangling pointers.


        Stefan




reply via email to

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