From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Tramp with global-auto-revert-mode. Date: 17 May 2004 17:22:03 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200405122254.i4CMsUj29445@raven.dms.auburn.edu> <200405122326.i4CNQk929511@raven.dms.auburn.edu> <200405132324.i4DNOBs14811@raven.dms.auburn.edu> <200405140008.i4E08lb14858@raven.dms.auburn.edu> <871xln4xmc.fsf-monnier+emacs@gnu.org> <200405140132.i4E1WaH15085@raven.dms.auburn.edu> <87vfiz3fez.fsf-monnier+emacs@gnu.org> <200405140308.i4E38b415540@raven.dms.auburn.edu> <87pt973b7y.fsf-monnier+emacs@gnu.org> <200405150139.i4F1dbs26083@raven.dms.auburn.edu> <200405152044.i4FKiig02345@raven.dms.auburn.edu> <200405161811.i4GIB3O03519@raven.dms.auburn.edu> <200405162004.i4GK4I503710@raven.dms.auburn.edu> <200405171503.i4HF36v0934 NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084808649 779 80.91.224.253 (17 May 2004 15:44:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 May 2004 15:44:09 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon May 17 17:43:53 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BPkHQ-0004WD-00 for ; Mon, 17 May 2004 17:43:52 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BPkHQ-0006Oj-00 for ; Mon, 17 May 2004 17:43:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BPkDn-0007Jp-4O for emacs-devel@quimby.gnus.org; Mon, 17 May 2004 11:40:07 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BPkD0-000789-Cn for emacs-devel@gnu.org; Mon, 17 May 2004 11:39:18 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BPkCS-00070r-QX for emacs-devel@gnu.org; Mon, 17 May 2004 11:39:16 -0400 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.34) id 1BPjwM-0003sm-Rc for emacs-devel@gnu.org; Mon, 17 May 2004 11:22:07 -0400 Original-Received: (qmail 22544 invoked from network); 17 May 2004 15:22:05 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 17 May 2004 15:22:05 -0000 Original-To: Luc Teirlinck In-Reply-To: <200405171503.i4HF36v09344@raven.dms.auburn.edu> Original-Lines: 39 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23584 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23584 Luc Teirlinck writes: > Kim Storm wrote: > > And I have studied the cause a little further and found at least one > reason for the crash -- trying to mark a Lisp_Misc_Free object, most > likely resulting from freeing a marker which is still present on > some undo list. > > Unless I am misunderstanding, it would seem that freeing a marker > which is still referenced on an undo list is a bug. Is disabling undo > in Tramp work buffers sufficient to avoid this kind of problem or is > there still a bug in the C code? In any case, the problem seems to be aggrevated by tramp as it has a marker which was put on the undo-list MANY MANY times ... But I guess it could happen with any code involving markers (which may explain some of the less frequent crashes in mark_object.) > > I have installed a fix for this; I don't know if it has any > bad effects, but at least it solves the crash for me. > > Clearly any bad effects will only occur in situations were Emacs would > have crashed earlier without your fix. An obvious bad effect is the > one you mentioned yourself in the comment to your fix: unpredictable > behavior if the user does `undo'. If the marker isn't reused, it boils down to checking that undo on a Lisp_Misc_Free object is a noop. My latest fix didn't mark the Lisp_Misc_Free cell as used -- I just committed another change to do that. It seems that primitive-undo just ignores a Lisp_Misc_Free object, so there doesn't seem to be a reason to worry about undefined behaviour. -- Kim F. Storm http://www.cua.dk