unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Ernesto Alfonso <erjoalgo@gmail.com>
Cc: 23667@debbugs.gnu.org
Subject: bug#23667: 24.4; "Stack overflow in regexp matcher" happens in only some buffers, for the same arguments
Date: Wed, 01 Jun 2016 02:36:34 -0400	[thread overview]
Message-ID: <b97fe94dql.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <87k2i9tyun.fsf@gmail.com> (Ernesto Alfonso's message of "Tue, 31 May 2016 19:41:20 -0700")

Ernesto Alfonso wrote:

> (let ((out (shell-command-to-string "curl http://pastebin.com/raw/a2pMaW6h")))
> 	 (string-match "\\(^[[:space:]]*\\([a-z]+\\) = \\(.*\\)\n\\)+" out 0))
>
> If I try this sexp on an ielm-mode or emacs-lisp-mode buffer (just two
> examples I tested), this evaluates to 0. If I try it on a message-mode
> or erc buffer, I get "Stack overflow in regexp matcher".

(length out) = 325969

> The evaluation should be independent of the buffer since no buffer
> contents should be involved.

[:space:] matches characters with whitespace syntax, and syntax is
buffer-local and varies between major modes. If you don't want that,
replace [:space:] with the exact characters you want to match.






  reply	other threads:[~2016-06-01  6:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01  2:41 bug#23667: 24.4; "Stack overflow in regexp matcher" happens in only some buffers, for the same arguments Ernesto Alfonso
2016-06-01  6:36 ` Glenn Morris [this message]
2016-06-01 14:42   ` Ernesto Alfonso
2016-06-01 17:44     ` Glenn Morris
2016-06-04  8:42     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b97fe94dql.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=23667@debbugs.gnu.org \
    --cc=erjoalgo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).