From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andrew Choi Newsgroups: gmane.emacs.devel Subject: Fix for Mac OS X Garbage Collection Crashes Date: Sun, 12 Oct 2003 17:57:50 -0600 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT X-Trace: sea.gmane.org 1066003597 12558 80.91.224.253 (13 Oct 2003 00:06:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Oct 2003 00:06:37 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Oct 13 02:06:35 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A8qEN-00058g-00 for ; Mon, 13 Oct 2003 02:06:35 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A8qEN-0003Ts-00 for ; Mon, 13 Oct 2003 02:06:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A8qBV-0002SK-OE for emacs-devel@quimby.gnus.org; Sun, 12 Oct 2003 20:03:37 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A8qBB-0002Rr-I1 for emacs-devel@gnu.org; Sun, 12 Oct 2003 20:03:17 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A8qAf-00028Q-FU for emacs-devel@gnu.org; Sun, 12 Oct 2003 20:03:16 -0400 Original-Received: from [24.71.223.10] (helo=pd2mo3so.prod.shaw.ca) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A8qAe-00027k-TU for emacs-devel@gnu.org; Sun, 12 Oct 2003 20:02:45 -0400 Original-Received: from pd2mr4so.prod.shaw.ca (pd2mr4so-ser.prod.shaw.ca [10.0.141.107]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003)) with ESMTP id <0HMO00LAR58HMG@l-daemon> for emacs-devel@gnu.org; Sun, 12 Oct 2003 17:57:53 -0600 (MDT) Original-Received: from pn2ml2so.prod.shaw.ca (pn2ml2so-qfe0.prod.shaw.ca [10.0.121.146]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003)) with ESMTP id <0HMO000AG58IE4@l-daemon> for emacs-devel@gnu.org; Sun, 12 Oct 2003 17:57:54 -0600 (MDT) Original-Received: from owlbear.local.shawmail (h68-144-207-94.cg.shawcable.net [68.144.207.94]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003)) with ESMTP id <0HMO00EPT58G9P@l-daemon> for emacs-devel@gnu.org; Sun, 12 Oct 2003 17:57:53 -0600 (MDT) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (darwin) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 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:17052 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17052 If you've updated and built Emacs from CVS on OS X within the past few weeks, you may have experienced crashes while Emacs is doing garbage collection. The following patch, just checked into CVS, solves the problem. I highly recommend updating to include it. Index: darwin.h =================================================================== RCS file: /cvs/emacs/src/s/darwin.h,v retrieving revision 1.12 diff -r1.12 darwin.h 319a320,323 > /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the > stack. */ > #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS > The problem is caused by a change to src/alloc.c about a month ago that causes garbage collection to crash under certain circumstances (when LISP_INT values are on the gcprolist) if GC_MARK_STACK is set to GC_USE_GCPROS_AS_BEFORE. The best way to fix the problem is probably to fix the bug introduced. I don't want to work on that. Instead I have now set GC_MARK_STACK to GC_MAKE_GCPROS_NOOPS. This option for GC has been chosen on nearly all other platforms. So by following suit on OS X, we may actually be using better-maintained code in the future. This is probably a better solution.