This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: [perl #133997] Assert fail with script runs
authorKarl Williamson <khw@cpan.org>
Sun, 14 Apr 2019 01:55:56 +0000 (19:55 -0600)
committerKarl Williamson <khw@cpan.org>
Sun, 14 Apr 2019 02:25:50 +0000 (20:25 -0600)
commit8e9f3eef1e2836fe28e16465c5a7bb39af947d81
treeeb0a1d11c32c9bc94955128a0d958ff72955ffe8
parent9a1ae8470c51eb467b9906a0c7faf9886dc12585
PATCH: [perl #133997] Assert fail with script runs

The cause of this is the emulation of recursion in executing regex
patterns and that the script run feature did not cooperate with it.  The
result is that the input pointers got pushed (but not the script run)
and popped, so that the script run was pointing to something that had
been tried, failed and otherwise popped.

The solution I've adopted is to always push the current script run start
position whenever a push is done; and pop it whenever a pop is done.

If someone has suggestions about this code, please step forward.
regexec.c
regexp.h
t/re/script_run.t