[Top][All Lists]

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

[debbugs-tracker] bug#29600: closed (Emacs port to gcc -fcheck-pointer-b

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#29600: closed (Emacs port to gcc -fcheck-pointer-bounds)
Date: Fri, 15 Dec 2017 07:27:02 +0000

Your message dated Thu, 14 Dec 2017 23:26:11 -0800
with message-id <address@hidden>
and subject line Emacs port to gcc -fcheck-pointer-bounds
has caused the debbugs.gnu.org bug report #29600,
regarding Emacs port to gcc -fcheck-pointer-bounds
to be marked as done.

(If you believe you have received this mail in error, please contact

29600: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29600
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Emacs port to gcc -fcheck-pointer-bounds Date: Wed, 6 Dec 2017 23:18:35 -0800 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 Attached is a series of three patches to port Emacs to 'gcc -fcheck-pointer-bounds'. This feature enables hardware bounds checking for some internal pointers of the Emacs interpreter, and I've used it to find a bug in Emacs itself. It's intended primarily for debugging Emacs internals, and is off by default. I would like to install these patches soon unless some problems turn up, and am submitting this as a bug report in case others who care about Emacs low-level internals would like to review the patches.

The first patch changes the basic Emacs internal type from an integer to a pointer of the same width. Although this doesn't significantly affect ordinary builds it's essential for -fcheck-pointer-type, where the C compiler must be told the location of every pointer (including tagged pointers) for the checking to work well. (No doubt I'm partial, but I think this patch also cleans up Emacs internals a bit even for typical platforms.) The patch should not change the behavior of the Emacs interpreter; it's mostly just treating some intptr_t values as pointer values instead.

The second patch builds on the first to fix Emacs so that it doesn't crash when -fcheck-pointer-bounds is used.

The third patch enables more pointer bounds checking. Not every pointer access is checked, just the ones for which -fcheck-pointer-bounds is easy. Although this doesn't catch every pointer-bounds error, it does catch some of them. Perhaps more checking could be added later.

Attachment: 0001-Reimplement-Lisp_Object-as-pointer-to-incomplete.patch
Description: Text Data

Attachment: 0002-Port-to-gcc-fcheck-pointer-bounds.patch
Description: Text Data

Attachment: 0003-Narrow-pointer-bounds-when-appropriate.patch
Description: Text Data

--- End Message ---
--- Begin Message --- Subject: Emacs port to gcc -fcheck-pointer-bounds Date: Thu, 14 Dec 2017 23:26:11 -0800 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0
Closing this bug report, as the basic idea is installed on master now.

--- End Message ---

reply via email to

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