From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Kalman Reti" Newsgroups: gmane.emacs.devel,gmane.emacs.bugs Subject: Re: mark_object crash in 22.1 and latest CVS (as of tonight) Date: Thu, 15 Nov 2007 03:38:52 -0500 Message-ID: <16af2f430711150038u692d7c5cw27666e11271d7f83@mail.gmail.com> References: <16af2f430711081955j3d5e6745gc0f7a50e02d9a892@mail.gmail.com> <16af2f430711090332x39c8c768gb01d1dc6a0e4f427@mail.gmail.com> <16af2f430711120340q27926877tf976ef397d12df16@mail.gmail.com> <16af2f430711140939x45663644je0dce25c8796b18@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1195116294 13021 80.91.229.12 (15 Nov 2007 08:44:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Nov 2007 08:44:54 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, kalman.reti@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 15 09:45:00 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IsaLL-0008Rh-Nt for ged-emacs-devel@m.gmane.org; Thu, 15 Nov 2007 09:45:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IsaL9-0008US-20 for ged-emacs-devel@m.gmane.org; Thu, 15 Nov 2007 03:44:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IsaFV-0006Nw-7I for emacs-devel@gnu.org; Thu, 15 Nov 2007 03:38:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IsaFS-0006Ms-Pm for emacs-devel@gnu.org; Thu, 15 Nov 2007 03:38:55 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IsaFR-0006Mk-Md for emacs-devel@gnu.org; Thu, 15 Nov 2007 03:38:54 -0500 Original-Received: from nz-out-0506.google.com ([64.233.162.235]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IsaFR-0005vU-Dg for emacs-devel@gnu.org; Thu, 15 Nov 2007 03:38:53 -0500 Original-Received: by nz-out-0506.google.com with SMTP id f1so440772nzc for ; Thu, 15 Nov 2007 00:38:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=QQOrcS35UTrnl+4Z5yy+giEnRlACQ3GpXWXcZQUCdng=; b=B6oDlADeTQVQutnpO8Un2x+ycqmUmjO6LdidwPiVa+XCZBvFqzzeIkYhG0qAxOfe0tzsBbZyV+QUeEo076DXHSjC8HAY68CQZRIkWd6tCaGYGk+dI00l5n942Kyc/xTynsi9IpZQCF/mGvMbc6Drh9lqtpkTLKruVQw18INiOOQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TX2G0H8pOVTlmen2MNjtvgi70fsJpzjS0CRxmz/Dn6EYJP9e7bhJU5hcslKMB5iELHs9MC9tD58V594PZ4kBZpSuhRE0k/CFWaAZLNePV7cObvuMYBmnUnIYyuuUvWn5kh/w0uqU2R+hV56pw9s8LeEyEX55nFGhRnh3magfYF8= Original-Received: by 10.143.157.10 with SMTP id j10mr40080wfo.1195115932304; Thu, 15 Nov 2007 00:38:52 -0800 (PST) Original-Received: by 10.143.167.19 with HTTP; Thu, 15 Nov 2007 00:38:52 -0800 (PST) In-Reply-To: Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:83250 gmane.emacs.bugs:16984 Archived-At: On Nov 14, 2007 10:08 PM, Richard Stallman 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 buffer-undo-list.