From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Emacs port to gcc -fcheck-pointer-bounds Date: Sun, 17 Dec 2017 18:47:38 -0800 Organization: UCLA Computer Science Department Message-ID: <5f53771e-aee9-9fe1-76a0-8aa1ab9b363e@cs.ucla.edu> References: <83indhwcx5.fsf@gnu.org> <83k1xwuwq3.fsf@gnu.org> <83efo2trwu.fsf@gnu.org> <83374hthe6.fsf@gnu.org> <1da23740-5960-9358-a46c-3b078428cb6c@cs.ucla.edu> <83indavbu6.fsf@gnu.org> <7172f906-7a58-9b60-a5c6-57c47cbcf989@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2DDB43971FB0005B4A9335C9" X-Trace: blaine.gmane.org 1513565198 12768 195.159.176.226 (18 Dec 2017 02:46:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 18 Dec 2017 02:46:38 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 18 03:46:34 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQlRp-00031G-V3 for ged-emacs-devel@m.gmane.org; Mon, 18 Dec 2017 03:46:34 +0100 Original-Received: from localhost ([::1]:56456 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQlTo-0006gZ-4Z for ged-emacs-devel@m.gmane.org; Sun, 17 Dec 2017 21:48:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQlT7-0006gP-Nf for emacs-devel@gnu.org; Sun, 17 Dec 2017 21:47:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQlT4-0002SR-JK for emacs-devel@gnu.org; Sun, 17 Dec 2017 21:47:53 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:50896) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eQlT4-0002QB-9m for emacs-devel@gnu.org; Sun, 17 Dec 2017 21:47:50 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2E2F0161373; Sun, 17 Dec 2017 18:47:47 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id XAVW24utBt8p; Sun, 17 Dec 2017 18:47:39 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 917391613B1; Sun, 17 Dec 2017 18:47:39 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gFingXACcFoo; Sun, 17 Dec 2017 18:47:39 -0800 (PST) Original-Received: from [192.168.1.9] (unknown [47.154.30.119]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 70CA9161086; Sun, 17 Dec 2017 18:47:39 -0800 (PST) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221202 Archived-At: This is a multi-part message in MIME format. --------------2DDB43971FB0005B4A9335C9 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable 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. Th= is=20 doesn't turn --enable-check-lisp-object-type into a no-op; it merely goes= back=20 to disabling it by default. We can remove it later if in practice it's no= t that=20 helpful to enable it. --------------2DDB43971FB0005B4A9335C9 Content-Type: text/x-patch; name="0001-Default-CHECK_LISP_OBJECT_TYPE-to-no.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Default-CHECK_LISP_OBJECT_TYPE-to-no.patch" =46rom 5959b48ece0abe4639667c023da6363859088676 Mon Sep 17 00:00:00 2001 From: Paul Eggert 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 =20 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}" !=3D "no"; t= hen + [Enable compile time checks for the Lisp_Object data type, + which can catch some bugs during development.])]) +if test "$enable_check_lisp_object_type" =3D 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=3D"-g3 -O2 -mmpx -fcheck-pointer-bounds"' on Intel MPX platforms. =20 +** 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. + =0C * Startup Changes in Emacs 27.1 =20 --=20 2.7.4 --------------2DDB43971FB0005B4A9335C9--