all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Emacs Development <Emacs-devel@gnu.org>
Subject: Re: Emacs port to gcc -fcheck-pointer-bounds
Date: Fri, 8 Dec 2017 16:13:00 +0000	[thread overview]
Message-ID: <CAOqdjBeS3nPUB4+=Eaf1dNjMtiiUFdHG1UwgOmYeu9ngRqyZmA@mail.gmail.com> (raw)
In-Reply-To: <e56a1290-e55e-537c-e38b-f8350dd638b0@cs.ucla.edu>

How does this work? Is sizeof(void *) == 24? (I don't have hardware
that supports this, unfortunately, and no software emulation appears
to be available).

I would suggest an explicit __bnd_check_pointer_bounds in
make_lisp_symbol until the GCC issue is fixed, as an out-of-bounds
symbol index seems a very real possibility for a bug. (And maybe
lisp.h should include ptr-bounds.h, as we'll probably need it in the
allocation functions there?)

The rest of the patch looks good to me, though it's unfortunate that
NIL_IS_ZERO's definition is becoming less futureproof (it's a minor
detail, but switching to a macro there might be better).

On Thu, Dec 7, 2017 at 7:34 AM, Paul Eggert <eggert@cs.ucla.edu> wrote:
> In <https://debbugs.gnu.org/29600> I published patches to port Emacs to the
> -fcheck-pointer-bounds option of GCC, so that I can debug Emacs with
> hardware pointer bounds checking on platforms that support it (such as the
> Kaby Lake chip in my year-old laptop running Ubuntu 17.10). This entails
> changing the fundamental Emacs internal word from an integer to a pointer of
> the same width - which is not as big a deal as one might think, as the
> commonly-used EMACS_INT type does not change and Emacs users and Emacs Lisp
> programmers should not notice any change.
>
> I would like to install these patches on 'master' soon, and am mentioning
> this on emacs-devel to give a heads-up to the few but hardy volunteers who
> work on the low-level part of the Emacs implementation.



  parent reply	other threads:[~2017-12-08 16:13 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
2017-12-08 16:13 ` Pip Cet [this message]
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='CAOqdjBeS3nPUB4+=Eaf1dNjMtiiUFdHG1UwgOmYeu9ngRqyZmA@mail.gmail.com' \
    --to=pipcet@gmail.com \
    --cc=Emacs-devel@gnu.org \
    --cc=eggert@cs.ucla.edu \
    /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.