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: Fix to long-standing crashes in GC Date: 30 May 2004 01:15:26 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <40A3BC23.8060000@math.ku.dk> <200405180013.i4I0Ddl15818@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1085872590 13026 80.91.224.253 (29 May 2004 23:16:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 29 May 2004 23:16:30 +0000 (UTC) Cc: Luc Teirlinck , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun May 30 01:16:24 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 1BUD3w-0000zA-00 for ; Sun, 30 May 2004 01:16:24 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BUD3w-0001QF-00 for ; Sun, 30 May 2004 01:16:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BUD42-0004Fr-Lk for emacs-devel@quimby.gnus.org; Sat, 29 May 2004 19:16:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BUD40-0004Fa-Ld for emacs-devel@gnu.org; Sat, 29 May 2004 19:16:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BUD3z-0004FO-7w for emacs-devel@gnu.org; Sat, 29 May 2004 19:16:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BUD3z-0004FE-6O for emacs-devel@gnu.org; Sat, 29 May 2004 19:16:27 -0400 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BUD2v-0005XP-Ua; Sat, 29 May 2004 19:15:23 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepc.post.tele.dk (Postfix) with SMTP id EC102262838; Sun, 30 May 2004 01:15:17 +0200 (CEST) Original-To: Stefan Monnier In-Reply-To: Original-Lines: 24 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:24200 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:24200 Stefan Monnier writes: > 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. Well, in the tests I performed trying to understand this bug, I frequently ran into cons cells pointing to de-allocated strings before I changed the sequence -- but after changing the sequence, I didn't have a single occurrence of a string pointing to a de-allocated cons cell. I'm not saying that it will not happen, but in practice it is less likely to happen. > > 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"). True -- but if you try to debug GC errors, I prefer the code to be as safe as possible. -- Kim F. Storm http://www.cua.dk