GNU bug report logs -
#25391
24.5; ffap-guesser "stack overflow in regexp matcher" error may crash emacs.
Previous Next
Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Date: Sun, 8 Jan 2017 07:32:01 UTC
Severity: minor
Tags: fixed, patch
Found in version 24.5
Fixed in version 26.1
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 25391 <at> debbugs.gnu.org (full text, mbox):
npostavs <at> users.sourceforge.net writes:
> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>> Reproduce from emacs -Q:
>>
>> 1) require ffap.
>> 2) Open a file of about 560k containing only one line, e.g
>> "~/emacs.d/elpa/archives/archive-contents"
>> 3) M-: (ffap-guesser)
>>
>> Debugger entered--Lisp error: (error "Variable binding depth exceeds max-specpdl-size")
>> looking-at("^.*\\<\\(Type\\|Name\\|Path\\|Host\\|Port\\) *= *\\(.*\\) *$")
> [...]
>>
>> This is reproductible from emacs-26 as well.
>
> The max-specpdl-size error looks like #24751 (I was planning to push the
> patch for that today), but as far as I know, that's only in emacs-26.
> emacs-25 and earlier correctly throw "stack overflow in regexp matcher".
> Unless you have REL_ALLOC enabled (which is the default for GNU/Linux
> distributions with the latest glibc), in which case any buffer search
> may crash emacs instead. That's #24358, occurs in 25.1 (and probably
> earlier), but it's already fixed in the emacs-25 branch. Also fixable
> by configuring with REL_ALLOC=no.
Good to know thanks.
However, this handle the problem with "Stack overflow in regexp matcher"
generally, but perhaps regexps such as `ffap-gopher-regexp` could be
avoided when possible in emacs source code.
IIUC regexps like "^.*\\(this\\|that etc...\\)" create an incredible
number of travels between bol and eol (which may sometimes be eob) and
lead to a stack overflow inevitably on long lines (perhaps not so long
in this case).
Thanks.
--
Thierry
This bug report was last modified 8 years and 130 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.