From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] emacs-25 ee04aed: Fix handling of buffer relocation in regex.c functions Date: Mon, 24 Oct 2016 09:25:07 +0300 Message-ID: <83mvhu5kn0.fsf@gnu.org> References: <20161023191028.10942.12099@vcs.savannah.gnu.org> <20161023191028.C103F220124@vcs.savannah.gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1477290397 9430 195.159.176.226 (24 Oct 2016 06:26:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Oct 2016 06:26:37 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 24 08:26:33 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 1byYi3-0007nB-8p for ged-emacs-devel@m.gmane.org; Mon, 24 Oct 2016 08:26:11 +0200 Original-Received: from localhost ([::1]:44821 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byYi5-0004l5-NN for ged-emacs-devel@m.gmane.org; Mon, 24 Oct 2016 02:26:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byYh8-0004HD-JW for emacs-devel@gnu.org; Mon, 24 Oct 2016 02:25:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byYh6-0003Ai-0Z for emacs-devel@gnu.org; Mon, 24 Oct 2016 02:25:14 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byYh5-0003Ae-Tx; Mon, 24 Oct 2016 02:25:11 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1309 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1byYh2-0003p9-Vz; Mon, 24 Oct 2016 02:25:10 -0400 In-reply-to: (message from Stefan Monnier on Sun, 23 Oct 2016 16:31:24 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:208653 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii > Date: Sun, 23 Oct 2016 16:31:24 -0400 > > > + /* Update 'base' due to possible relocation inside re_search_2. */ > > + base = current_buffer->text->beg; > > I recommend wrapping this in "#if REL_ALLOC", so as to make it clear why > relation might be possible (e.g. to distinguish from GC-triggered > relocation, for example) and to make it clear what could be gained by > getting rid of REL_ALLOC. IMO it makes no sense to condition only this on REL_ALLOC, without conditioning all the rest. The bulk is in regex.c, btw. I think we should consider these nits when we finish fixing the bugs due to relocation, one way or another. Until then we don't really know what parts will stay in the code. Thanks.