From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24358: 25.1.50; re-search-forward errors with "Variable binding depth exceeds max-specpdl-size" Date: Mon, 24 Oct 2016 19:13:15 +0300 Message-ID: <8337jl4tes.fsf@gnu.org> References: <83insov1zr.fsf@gnu.org> <87zilztzd5.fsf@users.sourceforge.net> <83oa2ftnvp.fsf@gnu.org> <87wph2ts1a.fsf@users.sourceforge.net> <83oa2erx0k.fsf@gnu.org> <87lgxht8hp.fsf@users.sourceforge.net> <871sz8kq2v.fsf@gmail.com> <87shroroh8.fsf@users.sourceforge.net> <838ttfpnxt.fsf@gnu.org> <83vawjo21l.fsf@gnu.org> <83bmybnopx.fsf@gnu.org> <8360ojnk0n.fsf@gnu.org> <83twc3m198.fsf@gnu.org> <83pomrlz27.fsf@gnu.org> <83k2cynabi.fsf@gnu.org> <87eg35swni.fsf@users.sourceforge.net> <83lgxd50ic.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1477325689 25821 195.159.176.226 (24 Oct 2016 16:14:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Oct 2016 16:14:49 +0000 (UTC) Cc: sam.halliday@gmail.com, 24358@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 24 18:14:42 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1byhtT-000523-N1 for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Oct 2016 18:14:35 +0200 Original-Received: from localhost ([::1]:47835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byhtV-0000oy-Q5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Oct 2016 12:14:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byhsz-0000TW-DX for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2016 12:14:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byhsw-0004Oa-SJ for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2016 12:14:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38762) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1byhsw-0004NY-PK for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2016 12:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1byhsw-0002NB-IT for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2016 12:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Oct 2016 16:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24358 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed Original-Received: via spool by 24358-submit@debbugs.gnu.org id=B24358.14773256129070 (code B ref 24358); Mon, 24 Oct 2016 16:14:02 +0000 Original-Received: (at 24358) by debbugs.gnu.org; 24 Oct 2016 16:13:32 +0000 Original-Received: from localhost ([127.0.0.1]:54160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byhsQ-0002MB-5m for submit@debbugs.gnu.org; Mon, 24 Oct 2016 12:13:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byhsN-0002Lx-O3 for 24358@debbugs.gnu.org; Mon, 24 Oct 2016 12:13:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byhsH-0003Xj-Kr for 24358@debbugs.gnu.org; Mon, 24 Oct 2016 12:13:22 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byhsE-0003Vm-Is; Mon, 24 Oct 2016 12:13:18 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2294 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1byhsD-0000PP-Qe; Mon, 24 Oct 2016 12:13:18 -0400 In-reply-to: (message from Noam Postavsky on Mon, 24 Oct 2016 11:33:11 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124961 Archived-At: > From: Noam Postavsky > Date: Mon, 24 Oct 2016 11:33:11 -0400 > Cc: 24358@debbugs.gnu.org, Sam Halliday > > > What bothers me is this: could it be that relocation happens between > > the first and the second line above? If it can, then what > > POINTER_TO_OFFSET does will be inconsistent with the base address at > > the time regstart[*p] was assigned the value of d. > > > > The code runs in a loop, or so it seems, so it's hard to reason about > > time sequences. > > Oh, I see. Yes, I think you're right, the pointers stored in regstart, > regend, and fail_stack could become inconsistent. Hard to say what > kind of regex could trigger it, but it seems quite possible. Maybe we should simply call r_alloc_inhibit_buffer_relocation around any calls to regex.c functions, and remove the code you wrote to handle relocations internally. I'm sorry I didn't look at this closer before, and thus caused you to work on all those changes, which we might now need to revert.