[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Stack overflow in regexp matcher
From: |
Stefan Monnier |
Subject: |
Re: Stack overflow in regexp matcher |
Date: |
Fri, 30 Mar 2007 15:39:23 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux) |
> With a recently compiled emacs, string-match on the following input
> causes a stack overflow.
Yup. Emacs's regexp matcher uses backtracking, even for regexps which could
be compiled into a DFA automaton. So stack overflows are basically
unavoidable in general and are hence not considered as bug in and of
themselves (instead, the bug is generally in the regexp which needs to be
optimized/adjusted to work around or minimize the stack overflow problem).
I.e. if you tell us more, then maybe we can tell you how to avoid
the problem.
Stefan