[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: c-mode imenu: Stack overflow in regexp matcher
From: |
Stefan Monnier |
Subject: |
Re: c-mode imenu: Stack overflow in regexp matcher |
Date: |
Wed, 07 Feb 2007 10:00:05 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) |
>> Please try and play with the text being matched to try and see which
>> part of the regexp is causing an overflow. Most likely the problem
>> is that something is matching a much longer text than expected (e.g.
>> tens/hundreds of nonempty lines rather than 1 or 2).
>>
>> Maybe it's the beginning: "^\\<[^()]*" since the \< only implies
>> that the first char will be a word-constituent, and the [^()]* can
>> then match any number of chars as long as there's no intervening
>> parenthesis, which seems quite possible in a long comment.
> This will do it:
> (goto-char (point-max))
> (re-search-backward "^\\<[^()]*[^[:alnum:]_:<>~]")
> It matches the whole of etc/splash.xpm from "static char..." right
> through to the end, some 60000 odd characters later.
Good, thanks. Then now we have to find someone who knows what the regexp is
supposed to match, so as to figure out how to rewrite it.
Stefan
- c-mode imenu: Stack overflow in regexp matcher, Glenn Morris, 2007/02/02
- Re: c-mode imenu: Stack overflow in regexp matcher, Chong Yidong, 2007/02/02
- Re: c-mode imenu: Stack overflow in regexp matcher, Glenn Morris, 2007/02/02
- Re: c-mode imenu: Stack overflow in regexp matcher, Glenn Morris, 2007/02/02
- Re: c-mode imenu: Stack overflow in regexp matcher, Stefan Monnier, 2007/02/04
- Re: c-mode imenu: Stack overflow in regexp matcher, Glenn Morris, 2007/02/06
- Re: c-mode imenu: Stack overflow in regexp matcher,
Stefan Monnier <=
- Re: c-mode imenu: Stack overflow in regexp matcher, Kim F. Storm, 2007/02/07
- Re: c-mode imenu: Stack overflow in regexp matcher, Stefan Monnier, 2007/02/07
- Re: c-mode imenu: Stack overflow in regexp matcher, Glenn Morris, 2007/02/19
- Re: c-mode imenu: Stack overflow in regexp matcher, Nick Roberts, 2007/02/19