all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: gpion@lfdj.com, Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: conservative stack scanning
Date: Fri, 11 Jan 2013 17:51:32 -0800	[thread overview]
Message-ID: <50F0C1A4.40309@cs.ucla.edu> (raw)
In-Reply-To: <jwv8v7z4ie9.fsf-monnier+emacs@gnu.org>

On 01/11/2013 11:51 AM, Stefan Monnier wrote:
> Shouldn't we just enable conservative stack scanning for
> all architectures?

Yes, we should give it a try.  If it doesn't work we can revert.
If it does work, we can simplify Emacs and this will help prevent
future bugs like Bug#13408.

Here's a proposed patch.

=== modified file 'ChangeLog'
--- ChangeLog	2013-01-11 23:28:04 +0000
+++ ChangeLog	2013-01-12 01:49:51 +0000
@@ -1,3 +1,10 @@
+2013-01-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+	Enable conservative stack scanning for all architectures.
+	Suggested by Stefan Monnier in
+	<http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00183.html>.
+	* configure.ac (GC_MARK_STACK): Remove.
+
 2013-01-11  Paul Eggert  <eggert@cs.ucla.edu>
 
 	* lib/getopt_.h: Remove trailing CRs that crept in.

=== modified file 'configure.ac'
--- configure.ac	2013-01-10 03:43:02 +0000
+++ configure.ac	2013-01-12 01:49:51 +0000
@@ -3777,22 +3777,13 @@
 esac
 
 
-dnl These won't be used automatically yet.  We also need to know, at least,
+dnl This won't be used automatically yet.  We also need to know, at least,
 dnl that the stack is continuous.
 AH_TEMPLATE(GC_SETJMP_WORKS, [Define if setjmp is known to save all
   registers relevant for conservative garbage collection in the jmp_buf.])
 
-AH_TEMPLATE(GC_MARK_STACK, [Define to GC_USE_GCPROS_AS_BEFORE if
-  conservative garbage collection is not known to work.])
-
 
 case $opsys in
-  aix4-2 | hpux* | unixware)
-    dnl Conservative garbage collection has not been tested, so for now
-    dnl play it safe and stick with the old-fashioned way of marking.
-    AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE])
-    ;;
-
   dnl Not all the architectures are tested, but there are Debian packages
   dnl for SCM and/or Guile on them, so the technique must work.  See also
   dnl comments in alloc.c concerning setjmp and gcc.
@@ -3807,8 +3798,7 @@
 #else
 # error "setjmp not known to work on this arch"
 #endif
-    ]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1),
-      AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE]) )
+    ]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1))
     ;;
 esac
 

=== modified file 'src/lisp.h'
--- src/lisp.h	2013-01-11 13:25:10 +0000
+++ src/lisp.h	2013-01-12 01:49:51 +0000
@@ -2217,7 +2217,14 @@
    2    Mark the stack, and check that everything GCPRO'd is
 	marked.
    3	Mark using GCPRO's, mark stack last, and count how many
-	dead objects are kept alive.  */
+	dead objects are kept alive.
+
+   Formerly, method 0 was used.  Currently, method 1 is used unless
+   specified by hand when building, e.g.,
+   "make CPPFLAGS='-DGC_MARK_STACK=GC_USE_GCPROS_AS_BEFORE'".
+   Methods 2 and 3 are present mainly to debug the transition from 0 to 1.
+   At some point we should simplify Emacs by removing support
+   for all methods other than method 1.  */
 
 
 #define GC_USE_GCPROS_AS_BEFORE		0





  reply	other threads:[~2013-01-12  1:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-10 17:46 bug#13408: Emacs pretest 24.2.92 - compilation error on AIX 5.3 using gcc 4.7-2 Gilles Pion
2013-01-11  6:26 ` Glenn Morris
2013-01-11  8:24   ` Eli Zaretskii
2013-01-11  8:03 ` Paul Eggert
2013-01-11  9:15   ` Eli Zaretskii
2013-01-11 19:11     ` Paul Eggert
2013-01-11 19:51       ` conservative stack scanning (was: Re: bug#13408: Emacs pretest 24.2.92 - compilation error on AIX 5.3 using gcc 4.7-2) Stefan Monnier
2013-01-12  1:51         ` Paul Eggert [this message]
2013-01-12  2:15           ` Broken !GC_MARK_STACK [Re: conservative stack scanning] Dmitry Antipov
2013-01-12  6:19             ` Paul Eggert
2013-01-14  9:59               ` Dmitry Antipov
2013-01-12  4:23           ` conservative stack scanning Stefan Monnier
2013-01-12  5:22             ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50F0C1A4.40309@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=gpion@lfdj.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.