|
From: | Christian Johansson |
Subject: | bug#53680: Endless loop in peculiar case of string-match and string-match-p 27.02 and 28.0.50 |
Date: | Tue, 1 Feb 2022 08:37:37 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
HelloSome context first, since I needed a multi-line regexp matcher that could tell the difference of end-of-string vs newline ($ vs \n) in a string I replace occurrences of \n with \r in a string.
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 (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·") -- Hälsningar / Best Regards Christian
[Prev in Thread] | Current Thread | [Next in Thread] |