From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: pipcet@gmail.com, Emacs-devel@gnu.org
Subject: Re: Emacs port to gcc -fcheck-pointer-bounds
Date: Wed, 13 Dec 2017 10:30:56 -0800 [thread overview]
Message-ID: <7172f906-7a58-9b60-a5c6-57c47cbcf989@cs.ucla.edu> (raw)
In-Reply-To: <83indavbu6.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 707 bytes --]
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.
[-- Attachment #2: 0001-Fix-type-typo-on-Solaris.patch --]
[-- Type: text/x-patch, Size: 794 bytes --]
From c662e2d4fc3678d1ea6eda16541b82bc88f0890b Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
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
next prev parent reply other threads:[~2017-12-13 18:30 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 [this message]
2017-12-13 19:17 ` Stefan Monnier
2017-12-13 19:39 ` Paul Eggert
2017-12-18 2:47 ` Paul Eggert
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7172f906-7a58-9b60-a5c6-57c47cbcf989@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=Emacs-devel@gnu.org \
--cc=eliz@gnu.org \
--cc=pipcet@gmail.com \
/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.