Subject: Re: bug#22149: 24.4; gdb stack overflow in regexp matcher

From: [email-masked]
Date: Thu, 30 Jun 2016 23:16:38 -0400

tags 22149 confirmed
found 22149 25.0.95
retitle 22149 stack overflow in regexp matcher
quit

Andreas Schwab <[email-masked]> writes:

> Cheng-An Yang <[email-masked]> writes:
>
>> I am using Emacs GDB Graphical Interface to debug a large C++ project.
>> When I stop at certain functions, it breaks the GDB interface with the
>> error message "Stack overflow in regexp matcher".
>
> I cannot reproduce that error with Emacs 24.5 when evaluating the
> string-match from the backtrace.

I'm able to reproduce with both 24.5 and 25.0.95.  Attaching testcase as
el file to avoid ambiguity.  Run as

    emacs -Q -l bug-22149-regexp-overflow.el

I'm entirely sure why this regexp triggers an overflow, but one that
doesn't trigger overflow, and I think should match the same is:

    "\\([~@&]\\)\\(\"\\(?:\\\\\"\\|[^\"]\\)*\"\\)\n"