diff options
| author | Mattias EngdegÄrd | 2022-10-23 15:40:37 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2022-10-24 11:50:13 +0200 |
| commit | 36f5a1a7e74442272796413575f85ba9bd18cb53 (patch) | |
| tree | 8a01195f9d287dfa53f48792afd5e0ad5da81d34 /src/bytecode.c | |
| parent | b5ada7aa6fcb14019df207259609d602150b03a4 (diff) | |
| download | emacs-36f5a1a7e74442272796413575f85ba9bd18cb53.tar.gz emacs-36f5a1a7e74442272796413575f85ba9bd18cb53.zip | |
Fix regexp matching with atomic strings and optimised backtracking
This bug occurs when an atomic pattern is matched at the end of
a string and the on-failure-keep-string-jump optimisation is
in effect, as in:
(string-match "\\'\\(?:ab\\)*\\'" "a")
which succeeded but clearly should not (bug#58726).
Reported by Michael Heerdegen.
* src/regex-emacs.c (PREFETCH): Add reset parameter.
(re_match_2_internal): Use it for proper atomic pattern treatment.
* test/src/regex-emacs-tests.el (regexp-atomic-failure): New test.
Diffstat (limited to 'src/bytecode.c')
0 files changed, 0 insertions, 0 deletions