summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2023-01-19 16:36:05 +0100
committerYves Orton <demerphq@gmail.com>2023-01-20 09:16:20 +0800
commite6f89d6bdb73975a869c4438cdd3501b8edd9a7e (patch)
treec1075829a0997b3cf0be397af491019e0750ecf8 /proto.h
parent82132a33be4e60debf3133ae86185f29f79dc092 (diff)
downloadperl-e6f89d6bdb73975a869c4438cdd3501b8edd9a7e.tar.gz
regexec.c - harden internals against missing logical_nparens
We can default a 0 rx->logical_nparens to rx->nparens. If rx->logical_nparens is zero then either rx->nparens is also zero, or it can be defaulted. This will fix most re::engine::XXX modules that do not know about the new field, provided they zero the rx structure during construction. If they don't then this patch won't hurt anything and we will have to patch them directly. Also mark re_op_compile() as available to extensions. Marking it as hidden means that re::engine::PCRE2 and others cannot build. This patch should go a long way towards fixing issue #20710.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/proto.h b/proto.h
index 157a25041d..4f6d9171cc 100644
--- a/proto.h
+++ b/proto.h
@@ -3616,8 +3616,7 @@ Perl_re_intuit_string(pTHX_ REGEXP * const r);
assert(r)
PERL_CALLCONV REGEXP *
-Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, OP *expr, const regexp_engine *eng, REGEXP *old_re, bool *is_bare_re, const U32 rx_flags, const U32 pm_flags)
- __attribute__visibility__("hidden");
+Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, OP *expr, const regexp_engine *eng, REGEXP *old_re, bool *is_bare_re, const U32 rx_flags, const U32 pm_flags);
#define PERL_ARGS_ASSERT_RE_OP_COMPILE \
assert(eng)