From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Concurrency has landed Date: Fri, 23 Dec 2016 23:49:39 -0500 Message-ID: References: <83oa0lgnzx.fsf@gnu.org> <83inqrfzzp.fsf@gnu.org> <83a8c3fxru.fsf@gnu.org> <0bcf38b7-0893-a300-39c3-32da985c5717@cs.ucla.edu> <9b3d4460-dae9-86a4-88d8-61944b485ce1@cs.ucla.edu> <85b5c73e-68be-28ec-328f-b0d4174d13fa@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1482555890 10316 195.159.176.226 (24 Dec 2016 05:04:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Dec 2016 05:04:50 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 24 06:04:46 2016 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 1cKeVh-0001vI-VM for ged-emacs-devel@m.gmane.org; Sat, 24 Dec 2016 06:04:46 +0100 Original-Received: from localhost ([::1]:42188 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKeVm-00044v-5I for ged-emacs-devel@m.gmane.org; Sat, 24 Dec 2016 00:04:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKeHB-00089c-Cp for emacs-devel@gnu.org; Fri, 23 Dec 2016 23:49:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKeH8-0001Lc-7l for emacs-devel@gnu.org; Fri, 23 Dec 2016 23:49:45 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:64600) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cKeH8-0001LO-1n for emacs-devel@gnu.org; Fri, 23 Dec 2016 23:49:42 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AOKQAu3EVY/+J3oWxdDgwBAQEBAgEBAQEIAQEBAYM4AQEBAQEfhFuFVJwCDhgBlFaCCIYcBAICghFCEgECAQEBAQEBAWIohGkBBAFWIwULCzQSFBgNJIh6CK0Ui0QBAQgCASSLGYopBY98imqbGoY6kE6BQSYOIngTDoNcHIEiWSCJLQEBAQ X-IPAS-Result: A0AOKQAu3EVY/+J3oWxdDgwBAQEBAgEBAQEIAQEBAYM4AQEBAQEfhFuFVJwCDhgBlFaCCIYcBAICghFCEgECAQEBAQEBAWIohGkBBAFWIwULCzQSFBgNJIh6CK0Ui0QBAQgCASSLGYopBY98imqbGoY6kE6BQSYOIngTDoNcHIEiWSCJLQEBAQ X-IronPort-AV: E=Sophos;i="5.33,749,1477972800"; d="scan'208";a="283699491" Original-Received: from 108-161-119-226.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([108.161.119.226]) by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 23 Dec 2016 23:49:40 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id B8CC6AE2A4; Fri, 23 Dec 2016 23:49:39 -0500 (EST) In-Reply-To: (Paul Eggert's message of "Fri, 23 Dec 2016 17:51:45 -0800") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:210768 Archived-At: > The problem with -fcheck-pointer-bounds does not occur when the program > computes p1 - p2, as the program still gets a valid integer. The problem > occurs later, when Emacs computes q + (p1 - p2), where q is a dangling > pointer into the old object. Hmm... can you show in the code where we do that? I'd expect the code would do something like "newp2 = newp1 + (oldp2 - oldp1)", whereas you seem to say that we do something more like "oldp2 = oldp1 + (newp2 - newp1)", which would indeed be more risky (tho if oldp2 did exist before the free, it should still work just fine even on odd architectures, but at least I can see where an eager bounds-checker could complain). Stefan