summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2012-04-01 13:22:14 +0100
committerDavid Mitchell <davem@iabyn.com>2012-06-13 13:32:51 +0100
commit5f616ea71479dec56520bc87978dd87ad7478dae (patch)
tree15033cd9e6557b053fe9c33cc44e40e82a0b29a6
parentf59909ab8dad6ceb1b77e37e3c84e0c43fa33064 (diff)
downloadperl-5f616ea71479dec56520bc87978dd87ad7478dae.tar.gz
eliminate RExC_seen_evals and RExC_rx->seen_evals
these were used as part of the old "use re 'eval'" security mechanism used by the now-eliminated PL_reginterp_cnt
-rw-r--r--dump.c2
-rw-r--r--ext/Devel-Peek/t/Peek.t1
-rw-r--r--regcomp.c9
-rw-r--r--regexp.h3
4 files changed, 1 insertions, 14 deletions
diff --git a/dump.c b/dump.c
index ce3386450b..0dffb350cd 100644
--- a/dump.c
+++ b/dump.c
@@ -2052,8 +2052,6 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
(UV)(r->gofs));
Perl_dump_indent(aTHX_ level, file, " PRE_PREFIX = %"UVuf"\n",
(UV)(r->pre_prefix));
- Perl_dump_indent(aTHX_ level, file, " SEEN_EVALS = %"UVuf"\n",
- (UV)(r->seen_evals));
Perl_dump_indent(aTHX_ level, file, " SUBLEN = %"IVdf"\n",
(IV)(r->sublen));
if (r->subbeg)
diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t
index 534c6d716b..2b5f6aa402 100644
--- a/ext/Devel-Peek/t/Peek.t
+++ b/ext/Devel-Peek/t/Peek.t
@@ -349,7 +349,6 @@ do_test('reference to regexp',
MINLENRET = 3
GOFS = 0
PRE_PREFIX = 4
- SEEN_EVALS = 0
SUBLEN = 0
SUBBEG = 0x0
ENGINE = $ADDR
diff --git a/regcomp.c b/regcomp.c
index fc13f9dc9e..42fedf4d75 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -133,7 +133,6 @@ typedef struct RExC_state_t {
I32 nestroot; /* root parens we are in - used by accept */
I32 extralen;
I32 seen_zerolen;
- I32 seen_evals;
regnode **open_parens; /* pointers to open parens */
regnode **close_parens; /* pointers to close parens */
regnode *opend; /* END node in program */
@@ -194,7 +193,6 @@ typedef struct RExC_state_t {
#define RExC_nestroot (pRExC_state->nestroot)
#define RExC_extralen (pRExC_state->extralen)
#define RExC_seen_zerolen (pRExC_state->seen_zerolen)
-#define RExC_seen_evals (pRExC_state->seen_evals)
#define RExC_utf8 (pRExC_state->utf8)
#define RExC_uni_semantics (pRExC_state->uni_semantics)
#define RExC_orig_utf8 (pRExC_state->orig_utf8)
@@ -5715,7 +5713,6 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
RExC_seen = 0;
RExC_in_lookbehind = 0;
RExC_seen_zerolen = *exp == '^' ? -1 : 0;
- RExC_seen_evals = 0;
RExC_extralen = 0;
RExC_override_recoding = 0;
@@ -5916,8 +5913,6 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
RExC_emit_bound = ri->program + RExC_size + 1;
pRExC_state->code_index = 0;
- /* Store the count of eval-groups for security checks: */
- RExC_rx->seen_evals = RExC_seen_evals;
REGC((U8)REG_MAGIC, (char*) RExC_emit++);
if (reg(pRExC_state, 0, &flags,1) == NULL) {
ReREFCNT_dec(rx);
@@ -8592,9 +8587,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
/* this is a pre-compiled code block (?{...}) */
cb = &pRExC_state->code_blocks[pRExC_state->code_index];
RExC_parse = RExC_start + cb->end;
- if (SIZE_ONLY)
- RExC_seen_evals++;
- else {
+ if (!SIZE_ONLY) {
OP *o = cb->block;
if (cb->src_regex) {
n = add_data(pRExC_state, 2, "rl");
diff --git a/regexp.h b/regexp.h
index 8a77122f79..df038a6af9 100644
--- a/regexp.h
+++ b/regexp.h
@@ -118,8 +118,6 @@ struct reg_code_block {
/* Information about the match that isn't often used */ \
/* offset from wrapped to the start of precomp */ \
PERL_BITFIELD32 pre_prefix:4; \
- /* number of eval groups in the pattern - for security checks */\
- PERL_BITFIELD32 seen_evals:28; \
CV *qr_anoncv /* the anon sub wrapped round qr/(?{..})/ */
typedef struct regexp {
@@ -492,7 +490,6 @@ get_regex_charset_name(const U32 flags, STRLEN* const lenp)
#define RX_GOFS(prog) (((struct regexp *)SvANY(prog))->gofs)
#define RX_LASTPAREN(prog) (((struct regexp *)SvANY(prog))->lastparen)
#define RX_LASTCLOSEPAREN(prog) (((struct regexp *)SvANY(prog))->lastcloseparen)
-#define RX_SEEN_EVALS(prog) (((struct regexp *)SvANY(prog))->seen_evals)
#define RX_SAVED_COPY(prog) (((struct regexp *)SvANY(prog))->saved_copy)
#endif /* PLUGGABLE_RE_EXTENSION */