unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: Emacs port to gcc -fcheck-pointer-bounds
Date: Sun, 17 Dec 2017 18:47:38 -0800	[thread overview]
Message-ID: <5f53771e-aee9-9fe1-76a0-8aa1ab9b363e@cs.ucla.edu> (raw)
In-Reply-To: <jwvmv2mv3si.fsf-monnier+gmane.emacs.devel@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 516 bytes --]

Stefan Monnier wrote:
>> and once you have the fake pointer, --enable-check-lisp-object-type
>> doesn't buy much extra safety that is useful.
> It does give us some extra checking, but not very much, indeed.
> Maybe we can turn it into a no-op.

To get the ball rolling on that, I installed the attached into master. This 
doesn't turn --enable-check-lisp-object-type into a no-op; it merely goes back 
to disabling it by default. We can remove it later if in practice it's not that 
helpful to enable it.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Default-CHECK_LISP_OBJECT_TYPE-to-no.patch --]
[-- Type: text/x-patch; name="0001-Default-CHECK_LISP_OBJECT_TYPE-to-no.patch", Size: 2138 bytes --]

From 5959b48ece0abe4639667c023da6363859088676 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 17 Dec 2017 18:43:14 -0800
Subject: [PATCH] Default CHECK_LISP_OBJECT_TYPE to "no"

* configure.ac: Go back to not defining CHECK_LISP_OBJECT_TYPE by
default for developer builds, since it is no longer that useful.
We can make it a no-op entirely later, if in practice it's not
that helpful to enable it.
---
 configure.ac | 7 +++----
 etc/NEWS     | 7 +++++++
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 562b19a..ec1418b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -900,10 +900,9 @@ AC_DEFUN
 
 AC_ARG_ENABLE([check-lisp-object-type],
   [AS_HELP_STRING([--enable-check-lisp-object-type],
-     [Enable compile-time checks for the Lisp_Object data type,
-      which can catch some bugs during development.
-      The default is "no" if --enable-gcc-warnings is "no".])])
-if test "${enable_check_lisp_object_type-$gl_gcc_warnings}" != "no"; then
+     [Enable compile time checks for the Lisp_Object data type,
+      which can catch some bugs during development.])])
+if test "$enable_check_lisp_object_type" = yes; then
   AC_DEFINE([CHECK_LISP_OBJECT_TYPE], 1,
     [Define to enable compile-time checks for the Lisp_Object data type.])
 fi
diff --git a/etc/NEWS b/etc/NEWS
index 1382f96..1ab1930 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -38,6 +38,13 @@ interpreter or modules that it uses.  If your platform supports it you
 can enable it when configuring, e.g., './configure CFLAGS="-g3 -O2
 -mmpx -fcheck-pointer-bounds"' on Intel MPX platforms.
 
+** Emacs now normally uses a pointer type instead of an integer type
+for the fundamental word in the Emacs Lisp interpreter, to help
+catch typos and support -fcheck-pointer-bounds.  The 'configure'
+option --enable-check-lisp-object-type is therefore no longer as
+useful and so is no longer enabled by default in developer builds,
+to reduce differences between developer and production builds.
+
 \f
 * Startup Changes in Emacs 27.1
 
-- 
2.7.4


  parent reply	other threads:[~2017-12-18  2:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07  7:34 Emacs port to gcc -fcheck-pointer-bounds Paul Eggert
2017-12-08 13:45 ` Eli Zaretskii
2017-12-08 22:06   ` Paul Eggert
2017-12-09  8:33     ` Eli Zaretskii
2017-12-10  7:10       ` Paul Eggert
2017-12-10 17:27         ` Eli Zaretskii
2017-12-11  7:54           ` Paul Eggert
2017-12-11 15:26             ` Eli Zaretskii
2017-12-12 23:35               ` Paul Eggert
2017-12-13 16:20                 ` Eli Zaretskii
2017-12-13 18:30                   ` Paul Eggert
2017-12-13 19:17                     ` Stefan Monnier
2017-12-13 19:39                       ` Paul Eggert
2017-12-18  2:47                       ` Paul Eggert [this message]
2017-12-08 16:13 ` Pip Cet
2017-12-08 22:09   ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=5f53771e-aee9-9fe1-76a0-8aa1ab9b363e@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).