From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bob Halley Newsgroups: gmane.emacs.devel Subject: buffer.c 1.407 badness Date: 05 Dec 2002 23:57:37 -0800 Sender: emacs-devel-admin@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1039162053 15074 80.91.224.249 (6 Dec 2002 08:07:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 6 Dec 2002 08:07:33 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18KDWF-0003uz-00 for ; Fri, 06 Dec 2002 09:07:31 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18KDem-0004JD-00 for ; Fri, 06 Dec 2002 09:16:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18KDOE-0002nH-00; Fri, 06 Dec 2002 02:59:14 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18KDNE-0000Kc-00 for emacs-devel@gnu.org; Fri, 06 Dec 2002 02:58:12 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18KDMg-0007kq-00 for emacs-devel@gnu.org; Fri, 06 Dec 2002 02:58:09 -0500 Original-Received: from woof.play-bow.org ([204.152.186.150]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18KDMg-0007jP-00; Fri, 06 Dec 2002 02:57:38 -0500 Original-Received: by woof.play-bow.org (Postfix, from userid 500) id E2EAD2EB3A; Thu, 5 Dec 2002 23:57:37 -0800 (PST) Original-To: emacs-pretest-bug@gnu.org Original-Lines: 43 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9913 I tried to build from the CVS mainline today, and it failed, with the bootstrap emacs segfaulting while compiling one of the esh modules during "make bootstrap". The stack trace was huge (over a thousand levels deep), and involved lots of calls in the gc involving object marking before one of them segfaulted. Experimentation with selective soure file reversions reveals that the problem occurs without fail if buffer.c 1.407 is present, and does not occur if buffer.c 1.406 is used instead. I have no understanding of the change made to buffer.c and cannot offer a fix. I also noticed something else while looking at diffs from alloca.c 1.21 to 1.22. It's not related to my problem since I'm using GCC 3.2 and thus not using this snippet of code, but other people with older systems may be. Note how the first "#ifdef emacs" is changed to "#ifndef emacs" in the patch below. This seems like a serious problem to me, especially since the comment above it in the source says that emacs wants xmalloc. @@ -91,12 +90,13 @@ Callers below should use malloc. */ -#ifdef emacs -#define malloc xmalloc -#ifdef EMACS_FREE -#define free EMACS_FREE -#endif -#endif +# ifndef emacs +# undef malloc +# define malloc xmalloc +# ifdef EMACS_FREE +# define free EMACS_FREE +# endif +# endif extern pointer malloc (); /* Define STACK_DIRECTION if you know the direction of stack