emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs port to gcc -fcheck-pointer-bounds


From: Pip Cet
Subject: Re: Emacs port to gcc -fcheck-pointer-bounds
Date: Fri, 8 Dec 2017 16:13:00 +0000

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 <address@hidden> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]