[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

buffer.c 1.407 badness

From: Bob Halley
Subject: buffer.c 1.407 badness
Date: 05 Dec 2002 23:57:37 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

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

@@ -91,12 +90,13 @@
    Callers below should use malloc.  */
-#ifdef emacs
-#define malloc xmalloc
-#ifdef EMACS_FREE
-#define free EMACS_FREE
+#  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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]