Subject: bug#65726: 29.1.50; Crash in regexp engine

From: Stefan Monnier <[email-masked]>
Date: Thu, 21 Sep 2023 14:08:58 -0400

> So this is what prevented me from running with counts above 2**15 and
> debugging enabled for all these years...

Looks like it.

In any case, I pushed a variant of the last patch to `master` and
I think the case is now closed.  We may want to revisit it, presumably
by really keeping track of the all visited nodes, but this seems to work
well for now and I'm confident that it is safe (regardless of the shape
of the bytecode, it should always terminate and it should never apply
the optimization if it's incorrect, and with the shape of the bytecode
we currently produce it does correctly apply the optimization in the cases
I checked).

        Stefan