emacs-devel
[Top][All Lists]
Advanced

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

Re: Fix to long-standing crashes in GC


From: Stefan Monnier
Subject: Re: Fix to long-standing crashes in GC
Date: 28 May 2004 19:49:54 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> Now, when we on next gc calls mark_stack, and thus mark_maybe_object /
> mark_maybe_pointer, we may accidentally have a pointer address that
> leads to a (valid) cons, which is checked with mark_maybe_object...
> that's ok, you see that it points to a valid cons block, and it is not
> marked Vdead.

Oh, yes, I understand now, thank you.

> BTW, I think that clearing the cons cells before strings is still a
> proper sequence in gc_sweep, as the old sequence (that your patch
> reinstalls)  implies that after cleaning the strings, there are
> cons cells (unmarked though) that points into freed memory.

I think this is a red-herring: doing it your way leads to temporarily having
non-marked strings whose text-properties might point to deallocated
cons-cells.

The sweep step simply has to be atomic, just like most of the GC itself
(afterall, that's why the mark&sweep algorithm is in the category called
"stop-the-world").


        Stefan




reply via email to

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