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: Wed, 13 Dec 2017 10:30:56 -0800 Organization: UCLA Computer Science Department Message-ID: <7172f906-7a58-9b60-a5c6-57c47cbcf989@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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------D4DDBD15D2D51839E29A00E0" X-Trace: blaine.gmane.org 1513191061 20390 195.159.176.226 (13 Dec 2017 18:51:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 13 Dec 2017 18:51:01 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 Cc: pipcet@gmail.com, Emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 13 19:50:58 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 1ePC7L-0004we-4C for ged-emacs-devel@m.gmane.org; Wed, 13 Dec 2017 19:50:55 +0100 Original-Received: from localhost ([::1]:37001 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePC7S-00028A-AE for ged-emacs-devel@m.gmane.org; Wed, 13 Dec 2017 13:51:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePBoO-0003oq-0a for Emacs-devel@gnu.org; Wed, 13 Dec 2017 13:31:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePBo9-00080I-5W for Emacs-devel@gnu.org; Wed, 13 Dec 2017 13:31:19 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:46434) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ePBo8-0007u3-S3; Wed, 13 Dec 2017 13:31:05 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 84392161286; Wed, 13 Dec 2017 10:31:00 -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 rp6M6dlQflVF; Wed, 13 Dec 2017 10:30:59 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BAAB116143F; Wed, 13 Dec 2017 10:30:59 -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 hg7ZczOEhgvK; Wed, 13 Dec 2017 10:30:59 -0800 (PST) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9DD0116097A; Wed, 13 Dec 2017 10:30:59 -0800 (PST) In-Reply-To: <83indavbu6.fsf@gnu.org> 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:221012 Archived-At: This is a multi-part message in MIME format. --------------D4DDBD15D2D51839E29A00E0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 12/13/2017 08:20 AM, Eli Zaretskii wrote: > 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. We could say that the fake pointer is only marginally safer, in the sense that --enable-check-lisp-object-type is only marginally safer than --disable-check-lisp-object-type. However, this marginal safety is useful; and once you have the fake pointer, --enable-check-lisp-object-type doesn't buy much extra safety that is useful. --------------D4DDBD15D2D51839E29A00E0 Content-Type: text/x-patch; name="0001-Fix-type-typo-on-Solaris.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Fix-type-typo-on-Solaris.patch" >From c662e2d4fc3678d1ea6eda16541b82bc88f0890b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 1 Dec 2016 22:45:07 -0800 Subject: [PATCH] Fix type typo on Solaris * src/sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]: Fix type mismatch, caught by --enable-check-lisp-object-type. --- src/sysdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sysdep.c b/src/sysdep.c index 892e97626b..257634292b 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -3371,7 +3371,7 @@ system_process_attributes (Lisp_Object pid) nread = 0; else { - record_unwind_protect (close_file_unwind, fd); + record_unwind_protect_int (close_file_unwind, fd); nread = emacs_read (fd, &pinfo, sizeof pinfo); } -- 2.14.3 --------------D4DDBD15D2D51839E29A00E0--