From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: Emacs port to gcc -fcheck-pointer-bounds Date: Fri, 8 Dec 2017 16:13:00 +0000 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1512749683 4293 195.159.176.226 (8 Dec 2017 16:14:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 8 Dec 2017 16:14:43 +0000 (UTC) Cc: Emacs Development To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 08 17:14:38 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNLIL-0000xQ-JQ for ged-emacs-devel@m.gmane.org; Fri, 08 Dec 2017 17:14:37 +0100 Original-Received: from localhost ([::1]:37942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNLIS-0004V4-Q1 for ged-emacs-devel@m.gmane.org; Fri, 08 Dec 2017 11:14:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNLHU-0004TN-Mx for Emacs-devel@gnu.org; Fri, 08 Dec 2017 11:13:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNLHT-0004VX-I9 for Emacs-devel@gnu.org; Fri, 08 Dec 2017 11:13:44 -0500 Original-Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:37484) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eNLHT-0004RY-Bx for Emacs-devel@gnu.org; Fri, 08 Dec 2017 11:13:43 -0500 Original-Received: by mail-wm0-x22e.google.com with SMTP id f140so3976446wmd.2 for ; Fri, 08 Dec 2017 08:13:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=hhwWSGIWUdF9XJ3ttvS3PYEfzBzvji7aPoxC4QQW4Qs=; b=GjQO2Dj3bcsiJWxpGx2a4dxGO3nw0LpZ2yc4T0HfQe7WcTDn0aztzSk857bYFZAsfG 84JPM3j6N2gDya44qOAv5a5yfTqZ+R8ceLvQeW878oAdcwxqiIzLhZw8DFsnV/ifd+Wz O9CGudQIVKwHuZ79xpraJWNYId2/BWjlCxW51pQ3mYkh9UAsWN9CTAwiqQsf0zNlrVhI dOIxPBjq7/hkBjgyucRAsto01ru2QquWq+xWOceuJg88EWY0MgkCTfsw9xk7mM3QrD8g zzriQkUb5rm4TI6dPPvpH/9ntEjtRxSgMV9aa+hatc2anKYgHqaQlYpnNfqXS9bC0pEf 11QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hhwWSGIWUdF9XJ3ttvS3PYEfzBzvji7aPoxC4QQW4Qs=; b=BbgkC0hXcPCnBG/VyLMt/FjyH2dCXOBnA8xtZMn7//qp7pKDoznFzde7mgaTnEEpkj OnVY/xGVYSicS0+R/fvehIceVgYtU0U6RjH0EOZB835DysNmeuNszfQY80HBAcl9JPUS Y2GD3KXCFFWgVSwqsDVuwBckhzHyQwTRyIIVJmKiYpS1nNMl5JBDEsfolVHdzZRKzDuV bqd5U26dGYg+r27UAIZ3uNRRszIi0DRQ9Y5t6ViyX2m4svbyzJTl8oO5bLyLDIQgnSIp LrPJk2W7MPsSiVBi299s7BIPmv7laODFyOPEOxiH7lleGtG/8Ip2gcbbK9WIQGyBqDdi LK0w== X-Gm-Message-State: AKGB3mLmbS2dhhZ4bP2tY2YgT1ojzWvzbta2CxewLYq0PYF4A4a99z6k yawUFtdiwv31rv2Z8dEFFAq9hLW9xr5UcMTQSWk= X-Google-Smtp-Source: AGs4zMZY9k9DtjObpo2EdKkI+PyMm1S6vOFUXb1tnpQ5QU70q0hK7N28sHRZMV6Ouxa85sGPxAXiQXEZhcjF77GXwsI= X-Received: by 10.80.177.188 with SMTP id m57mr9451142edd.178.1512749620924; Fri, 08 Dec 2017 08:13:40 -0800 (PST) Original-Received: by 10.80.150.6 with HTTP; Fri, 8 Dec 2017 08:13:00 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:220790 Archived-At: 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 wrote: > In 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.