tags 22149 confirmed found 22149 25.0.95 retitle 22149 stack overflow in regexp matcher quit Andreas Schwab writes: > Cheng-An Yang 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"