summaryrefslogtreecommitdiff
path: root/regexp.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-04-13 19:55:56 -0600
committerKarl Williamson <khw@cpan.org>2019-04-13 20:25:50 -0600
commit8e9f3eef1e2836fe28e16465c5a7bb39af947d81 (patch)
treeeb0a1d11c32c9bc94955128a0d958ff72955ffe8 /regexp.h
parent9a1ae8470c51eb467b9906a0c7faf9886dc12585 (diff)
downloadperl-8e9f3eef1e2836fe28e16465c5a7bb39af947d81.tar.gz
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.
Diffstat (limited to 'regexp.h')
-rw-r--r--regexp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/regexp.h b/regexp.h
index 45f64e8cdb..0f35205e1a 100644
--- a/regexp.h
+++ b/regexp.h
@@ -715,6 +715,7 @@ typedef struct regmatch_state {
int resume_state; /* where to jump to on return */
char *locinput; /* where to backtrack in string on failure */
char *loceol;
+ U8 *sr0; /* position of start of script run, or NULL */
union {