This is a tentative patch that I'd really like people to beat on.
There is a bug in the regexp engine that goes way back, and it's
particularly tickled by the regexps in the java/jde fontlock code.
An easy way to check (this will crater XEmacs!) it is to create a test
java file (C-x f /tmp/test.java) , and do the following:
I C-u 68 <space> I C-a C-f C-f X <boom!>
The problem is that if the pattern jumps out of a nested group, the
lowest active register is not being properly reset. This results in
lowest being greater than highest, and a lot of pointer arithmetic
gets fubared (the 68 spaces above makes sure that the pointer will
jump way past the potential reg and failure heaps and into other
memory to cause the crash). This might explain why the bug hasn't
been found until now: unless you're applying a rather deeply nested
match against a whole line the memory stomping will probably be in
areas that aren't used.
I'm running my version of Norwegian with this, and so far have had no problems.
(in fact, in some cases it feels a little faster... wonder why?) but
I'd really like everyone to pound on this before I say stick it into
21.0. Granted it fixes a bug that we've receieved several bug reports
on, and I'm 80% sure it's the proper solution, but I don't want to
cause more problems than I fix...
--
Jareth Hein | jareth(a)camelot.co.jp | ハイン ジェラス
Toolsmith & Program lead |
http://www.camelot.co.jp | 開発部チーフ
Camelot Software, Ltd. | |(株)キャメロット
"It's a sad sign of the times when 'political machine' is redefined to
include 'main-line battle tank'" - Ambassador Grossblunder