From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Emacs port to gcc -fcheck-pointer-bounds Date: Wed, 13 Dec 2017 14:17:45 -0500 Message-ID: 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: text/plain X-Trace: blaine.gmane.org 1513192685 24178 195.159.176.226 (13 Dec 2017 19:18:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 13 Dec 2017 19:18:05 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 13 20:18:02 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 1ePCXY-00060a-15 for ged-emacs-devel@m.gmane.org; Wed, 13 Dec 2017 20:18:00 +0100 Original-Received: from localhost ([::1]:37178 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePCXf-0005GU-5i for ged-emacs-devel@m.gmane.org; Wed, 13 Dec 2017 14:18:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePCXV-0005Fl-Tk for emacs-devel@gnu.org; Wed, 13 Dec 2017 14:17:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePCXQ-0003zm-Vp for emacs-devel@gnu.org; Wed, 13 Dec 2017 14:17:57 -0500 Original-Received: from [195.159.176.226] (port=42802 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ePCXQ-0003yq-O7 for emacs-devel@gnu.org; Wed, 13 Dec 2017 14:17:52 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ePCXH-0005Hl-MX for emacs-devel@gnu.org; Wed, 13 Dec 2017 20:17:43 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 19 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:OwwTaI3LqPE55UvxPu/3lenIZjg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:221014 Archived-At: >> using a (fake) pointer is only marginally safer than using an >> integer, isn't it? > The fake pointer catches (at compile-time) common faults like the one the > attached patch fixes, where an int was passed where a Lisp_Object was > expected. These are the most important faults > that --enable-check-lisp-object-type catches. Indeed, it doesn't catch things like `x + n` since adding a constant to a pointer is also a valid operation, but it does catch the vast majority of problems. > 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. Stefan