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: 20 May 2004 00:37:31 +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 1085011084 4096 80.91.224.253 (19 May 2004 23:58:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 May 2004 23:58:04 +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 Thu May 20 01:57: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 1BQawb-0000uN-00 for ; Thu, 20 May 2004 01:57:53 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BQawb-0004Yv-00 for ; Thu, 20 May 2004 01:57:53 +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 1BQamw-0003Ok-UH for emacs-devel@quimby.gnus.org; Wed, 19 May 2004 19:47:54 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BQai0-0002bO-SN for emacs-devel@gnu.org; Wed, 19 May 2004 19:42:49 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BQZkQ-000757-OQ for emacs-devel@gnu.org; Wed, 19 May 2004 18:41:45 -0400 Original-Received: from [195.41.46.236] (helo=pfepb.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BQZgo-0006XL-IQ; Wed, 19 May 2004 18:37:30 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepb.post.tele.dk (Postfix) with SMTP id 467485EE02B; Thu, 20 May 2004 00:37:29 +0200 (CEST) Original-To: Stefan Monnier In-Reply-To: Original-Lines: 33 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:23747 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23747 Stefan Monnier writes: > > I have now found two different cases where a pointer on the stack > > points to GC-managed memory (mem_find finds it), to a cons cell with a > > Lisp_Misc_Free in the car and a bogus list in the cdr. I suspect there > > are many more such cases. > > Right. And it should never happen. > > > I included one such list in my previous mail. > > Yes, I've seen it. Thank you. > > >> So I think w need to look further. > > Looking for what? > > For what causes Lisp_Misc_Free cells to appear in the car of cons cells that > are apparently live. I'm not sure how best to do that. Maybe we should > write a GC-sanity-check routine (scan all cons blocks looking for live cells > with misc free objects in them) that we could call at GC-entry and GC-exit, > this way we could at least see whether the problem happens during GC or > between GC. Yesterday, I did a partial test where I wrote a fun to check all Lisp_Misc blocks for invalid misc types (except Lisp_Misc_Free) for every call to Fcons -- and no such problems occurred, i.e. the bad misc cells pointed to from some cons cells were NOT in the marker block chain... I will make another test to check the cons blocks in a similar way. -- Kim F. Storm http://www.cua.dk