GNU bug report logs -
#53680
Endless loop in peculiar case of string-match and string-match-p 27.02 and 28.0.50
Previous Next
Reported by: Christian Johansson <christian <at> cvj.se>
Date: Tue, 1 Feb 2022 07:38:01 UTC
Severity: normal
Tags: confirmed, notabug
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 53680 <at> debbugs.gnu.org (full text, mbox):
Christian Johansson <christian <at> cvj.se> writes:
> In a peculiar case a endless loop happens and I can reproduce this bug
> in Emacs 27.2 and 28.0.50 (have not tested any other versions), ok try
> to eval following snippet:
>
> (string-match-p·"[\r\t·]*implements[\r\t·]+\\([\r\t·]*[\\a-zA-Z_0-9_]+,?\\)+[\r\t·]*{$"·"ariable·implements·\\Magento\\Framework\\Event\\OberserverInterface\r{\r····public·function·__construct()\r·")
> or
I guess the · are supposed to be spaces, so it's:
(string-match
"[\r\t ]*implements[\r\t ]+\\([\r\t ]*[\\a-zA-Z_0-9_]+,?\\)+[\r\t ]*{$"
"ariable implements \\Magento\\Framework\\Event\\OberserverInterface\r{\r public function __construct()\r ")
And I can reproduce this on master, too. Is it a problem with excessive
backtracking, perhaps? I let it run for a minute, and it didn't finish
in that time.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 106 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.