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: Fri, 14 Oct 2016 10:02:29 +0300 Message-ID: <8360ov8lbu.fsf@gnu.org> References: <87twe6sx2g.fsf@users.sourceforge.net> <87eg51ng4r.fsf_-_@users.sourceforge.net> <87k2djwumn.fsf@users.sourceforge.net> <83h98nidvd.fsf@gnu.org> <87eg3rvtsf.fsf@users.sourceforge.net> <83k2dihpm9.fsf@gnu.org> <8760p2wzgj.fsf@users.sourceforge.net> <838ttyhhzu.fsf@gnu.org> <871szqwu51.fsf@users.sourceforge.net> <831szqhbc2.fsf@gnu.org> <87h98hujcx.fsf@users.sourceforge.net> <831szkahyz.fsf@gnu.org> <87eg3jvfj6.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1476428999 26281 195.159.176.226 (14 Oct 2016 07:09:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Oct 2016 07:09:59 +0000 (UTC) Cc: 24358@debbugs.gnu.org, peder@klingenberg.no To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 14 09:09:56 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 1buwcR-00033k-DD for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Oct 2016 09:09:27 +0200 Original-Received: from localhost ([::1]:45345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buwcP-00075W-ES for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Oct 2016 03:09:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buwXF-0002od-3z for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2016 03:04:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buwXB-0005Tc-SM for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2016 03:04:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buwXB-0005TY-Oo for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2016 03:04:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1buwXB-0005pa-Ib for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2016 03:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2016 07:04:01 +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: Original-Received: via spool by 24358-submit@debbugs.gnu.org id=B24358.147642859022352 (code B ref 24358); Fri, 14 Oct 2016 07:04:01 +0000 Original-Received: (at 24358) by debbugs.gnu.org; 14 Oct 2016 07:03:10 +0000 Original-Received: from localhost ([127.0.0.1]:54724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buwWM-0005oS-BJ for submit@debbugs.gnu.org; Fri, 14 Oct 2016 03:03:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buwWK-0005oD-Bz for 24358@debbugs.gnu.org; Fri, 14 Oct 2016 03:03:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buwWC-00058r-9t for 24358@debbugs.gnu.org; Fri, 14 Oct 2016 03:03:03 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35077) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buwVp-00052j-C9; Fri, 14 Oct 2016 03:02:37 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1701 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1buwVn-0004U8-AZ; Fri, 14 Oct 2016 03:02:35 -0400 In-reply-to: <87eg3jvfj6.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) 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:124456 Archived-At: > X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, > T_DKIM_INVALID autolearn=disabled version=3.3.2 > From: npostavs@users.sourceforge.net > Cc: 24358@debbugs.gnu.org, peder@klingenberg.no > Date: Thu, 13 Oct 2016 22:19:09 -0400 > > Eli Zaretskii writes: > > >> From: npostavs@users.sourceforge.net > >> Cc: 24358@debbugs.gnu.org, peder@klingenberg.no > >> Date: Wed, 12 Oct 2016 21:29:34 -0400 > >> > >> > Anyway, the way to countermand this is to record in a local variable > >> > the offset from beginning of buffer text to the value of the C pointer > >> > before the call to record_xmalloc, then apply the offset after the > >> > call to the new buffer text address. (Let me know if this is clear > >> > enough.) > >> > > >> > You can find an example of this in coding.c:decode_coding_emacs_mule > >> > (search for "relocated" in that function). > >> > >> This does involve passing down the lisp reference, right? Just want to > >> make sure I'm not missing something obvious before I start changing the > >> interface on a bunch of functions. > > > > Aren't we talking about searching buffer text in this case? If so, > > the start address of the buffer text is known globally, it is given by > > current_buffer->text->beg. > > The particular crash reported is during a buffer search, but the bug is > in re_match_2_internal which (if I understand correctly) may be called > for string search as well. Then yes, you will need to somehow pass down the object from which the text comes. It can be in some global variable, for instance, if changing the function's signature is undesirable.