summaryrefslogtreecommitdiff
path: root/regcomp_debug.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2023-01-08 11:35:38 +0100
committerYves Orton <demerphq@gmail.com>2023-01-15 17:21:25 +0100
commit98ce67cb64ba29be3aa5fd5b81012a3aab873b8e (patch)
tree3d8cc0841fb8b36a3cf18da610cb033345b44814 /regcomp_debug.c
parent0678333e684b55ba8877db1f865692713dacafc0 (diff)
downloadperl-98ce67cb64ba29be3aa5fd5b81012a3aab873b8e.tar.gz
regcomp_study.c - disable CURLYX optimizations when EVAL has been seen anywhere
Historically we disabled CURLYX optimizations when they *contained* an EVAL, on the assumption that the optimization might affect how many times, etc, the eval was called. However, this is also true for CURLYX with evals *afterwards*. If the CURLYN or CURLYM optimization can prune off the search space, then an eval afterwards will be affected. An when you take into account GOSUB, it means that an eval in front might be affected by an optimization after it. So for now we disable CURLYN and CURLYM in any pattern with an EVAL.
Diffstat (limited to 'regcomp_debug.c')
-rw-r--r--regcomp_debug.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/regcomp_debug.c b/regcomp_debug.c
index 74f080a9d9..589ca6991f 100644
--- a/regcomp_debug.c
+++ b/regcomp_debug.c
@@ -83,8 +83,12 @@ Perl_debug_studydata(pTHX_ const char *where, scan_data_t *data,
DECLARE_AND_GET_RE_DEBUG_FLAGS;
DEBUG_OPTIMISE_MORE_r({
- if (!data)
+ if (!data) {
+ Perl_re_indentf(aTHX_ "%s: NO DATA",
+ depth,
+ where);
return;
+ }
Perl_re_indentf(aTHX_ "%s: M/S/D: %" IVdf "/%" IVdf "/%" IVdf " Pos:%" IVdf "/%" IVdf " Flags: 0x%" UVXf,
depth,
where,