bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#65726: 29.1.50; Crash in regexp engine


From: Stefan Monnier
Subject: bug#65726: 29.1.50; Crash in regexp engine
Date: Sun, 17 Sep 2023 23:59:32 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> So maybe we should `skip_noops` before looking at the destinations to
> decide if it's a loop?

Nah, just introduces other problems :-(

BTW maybe we should replace

    31:     /on_failure_jump_loop to 37
    34:     /jump to 9

with

    31:     /on_failure_dont_jump_loop to 9

It's quite funny actually: with the current bytecodes, every iteration
of a backtracking greedy loop runs `jump + on_failure_jump`, whereas for
a non-greedy loop every iteration runs just a single `on_failure_jump`.
Yet those bytecodes predate the introduction of non-greedy loops :-)

[ Of course, there are reasons for it, beside historical ones: it's harder
  to rewrite a loop that ends with `on_failure_dont_jump_smart` into one
  using `on_failure_keep_string_jump` :-(  ]


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]