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: Stefan Monnier
Subject: Re: Emacs port to gcc -fcheck-pointer-bounds
Date: Wed, 13 Dec 2017 14:17:45 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> 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




reply via email to

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