GNU bug report logs - #41155
26.3; regexp 99% locks up emacs

Previous Next

Package: emacs;

Reported by: jan <rtm443x <at> googlemail.com>

Date: Sat, 9 May 2020 17:32:02 UTC

Severity: normal

Found in version 26.3

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 41155 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: jan <rtm443x <at> googlemail.com>
Cc: 41155 <at> debbugs.gnu.org
Subject: 26.3; regexp 99% locks up emacs
Date: Tue, 12 May 2020 13:56:05 -0700
> I originally put it down to the regexp being clearly pathalogical

Yes, that's pretty much it. Emacs uses a backtracking matcher and its worst case
performance is exponential. You can even use the matcher to solve Diophantine
integer equations ... verrrryy slowly; see:

http://blog.stevenlevithan.com/archives/algebra-with-regexes

So, don't do that. (Or if you *do* want to do that, fix the matcher - but good
luck with that....)




This bug report was last modified 5 years and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.