[Top][All Lists]

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

Re: mark_object crash in 22.1 and latest CVS (as of tonight)

From: Kalman Reti
Subject: Re: mark_object crash in 22.1 and latest CVS (as of tonight)
Date: Thu, 15 Nov 2007 03:38:52 -0500

On Nov 14, 2007 10:08 PM, Richard Stallman <address@hidden> wrote:
> Nothing gets "removed" from the undo list in normal use.  It gets
> truncated, which drops off elements at the end, but other than that
> all that normally happens is that editing operations add elements.
> Markers in the list should not become free, because the undo list
> itself should preserve them from GC.
> If this is reproducible, can you put a breakpoint at Fgarbage_collect
> and examine the data just before the GC which gets this crash?
> Examine that list using the x... commands, and see if that marker
> is already free.
>     Looking harder at the code, I'm convinced that the undo_list should come 
> before
>     the name entry in the buffer structure,
> Definitely not.  It needs to be AFTER `name' so that it will be marked
> by GC.

There is special code at the end of Fgarbage_collect (just before the
call to gc_sweep) which seems like it would have no point if this were
true.  It removes elements referring to unmarked markers and then
explicitly marks the undo_list slot afterwards.  The comment there reads:

        /* Now that we have stripped the elements that need not be in the
           undo_list any more, we can finally mark the list.  */
        mark_object (nextb->undo_list);

It seems to me that if the undo_list were after name, then all the markers
in the list would have already been marked and this code would be an
elaborate no-op, no?

>     Anyone know what the elements of the undo_list mean?  Some are conses
>     with a marker
>     in their CAR and a number in their CDR, some are just conses of two
>     numbers and some
>     are conses of a string and a number.
> The Lisp Manual documents these.  Node `Undo'.

Thanks.  Someone already pointed me at the documentation string for

reply via email to

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