1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-28 10:51:29 -08:00
emacs/test/src
Mattias Engdegård 36f5a1a7e7 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.
2022-10-24 11:50:13 +02:00
..
comp-resources
emacs-module-resources
lread-resources
regex-resources
syntax-resources
alloc-tests.el
buffer-tests.el
callint-tests.el
callproc-tests.el
casefiddle-tests.el
character-tests.el
charset-tests.el
chartab-tests.el
cmds-tests.el
coding-tests.el
comp-tests.el
data-tests.el
decompress-tests.el
doc-tests.el
editfns-tests.el
emacs-module-tests.el
emacs-tests.el
eval-tests.el
fileio-tests.el
filelock-tests.el
floatfns-tests.el
fns-tests.el
font-tests.el
image-tests.el
indent-tests.el
inotify-tests.el
json-tests.el
keyboard-tests.el
keymap-tests.el
lcms-tests.el
lread-tests.el
marker-tests.el
minibuf-tests.el
print-tests.el
process-tests.el
regex-emacs-tests.el Fix regexp matching with atomic strings and optimised backtracking 2022-10-24 11:50:13 +02:00
search-tests.el
sqlite-tests.el
syntax-tests.el
textprop-tests.el
thread-tests.el
timefns-tests.el
undo-tests.el
xdisp-tests.el
xfaces-tests.el
xml-tests.el