emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 8ba156f: Attempt to avoid crashes in plist-memb


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 8ba156f: Attempt to avoid crashes in plist-member
Date: Tue, 13 Oct 2015 15:05:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> Not the value of CONSP, the list itself.  We follow the CONSP test
> with XCAR, which crashed.  The only way I could imagine that happening
> is that the list got modified between the test and the XCAR call.  Is
> there any other way to explain that?

The result of the CONSP test shouldn't be affected by anything at all
(it's basically testing some bit-pattern on the integer value stored in
the local variable, so no external code should be able to change it
since we don't pass any reference to that variable anywhere).

So doing moving the CONSP test before/after the QUIT shouldn't make any
difference.  Of course, if the Lisp_Object value is a reference to
a cons cell that got GC'd away, CONSP will still return true while XCAR
could crash or return garbage.  Similarly, if the Lisp_Object value is
garbage, CONSP might return true while XCAR might crash (or return
further garbage).

I think the symptoms you describe seem to indicate that we have
a problem where the GC collected a cons cell that was still in use
(otherwise, if CONSP is true, than XCAR should not crash, no matter what
happens between the two).


        Stefan



reply via email to

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