From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: npostavs@users.sourceforge.net
Cc: 25391@debbugs.gnu.org
Subject: bug#25391: 24.5; ffap-guesser "stack overflow in regexp matcher" error may crash emacs.
Date: Sun, 08 Jan 2017 18:28:40 +0100 [thread overview]
Message-ID: <8760lp8nqv.fsf@gmail.com> (raw)
In-Reply-To: <87y3yl1tdp.fsf@users.sourceforge.net>
npostavs@users.sourceforge.net writes:
> Thierry Volpiatto <thierry.volpiatto@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
next prev parent reply other threads:[~2017-01-08 17:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-08 7:31 bug#25391: 24.5; ffap-guesser "stack overflow in regexp matcher" error may crash emacs Thierry Volpiatto
2017-01-08 15:08 ` npostavs
2017-01-08 17:28 ` Thierry Volpiatto [this message]
2017-01-08 23:29 ` npostavs
2017-01-09 7:00 ` Thierry Volpiatto
2017-01-10 4:37 ` npostavs
2017-01-10 7:17 ` Thierry Volpiatto
2017-01-10 13:37 ` npostavs
2017-01-10 14:42 ` Thierry Volpiatto
2017-01-14 2:25 ` npostavs
2017-01-14 6:57 ` npostavs
[not found] ` <874m12t57f.fsf@gmail.com>
2017-01-14 14:43 ` Noam Postavsky
[not found] ` <8737gltvw8.fsf@gmail.com>
2017-01-15 19:08 ` Noam Postavsky
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8760lp8nqv.fsf@gmail.com \
--to=thierry.volpiatto@gmail.com \
--cc=25391@debbugs.gnu.org \
--cc=npostavs@users.sourceforge.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.