bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23667: 24.4; "Stack overflow in regexp matcher" happens in only some


From: Ernesto Alfonso
Subject: bug#23667: 24.4; "Stack overflow in regexp matcher" happens in only some buffers, for the same arguments
Date: Wed, 1 Jun 2016 07:42:53 -0700

Hi,

I wasn't aware that [:space:] could vary by buffer. I replaced with
the exact character class I want and I'm no longer getting the stack
overflow.

Feel free to close this report as a mistake on my end. Though ideally
string-match shouldn't crash for that length of input, I could see
easily users working with buffers of that size.

Thanks,

Ernesto

On 5/31/16, Glenn Morris <rgm@gnu.org> wrote:
> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]