diff options
author | David Mitchell <davem@iabyn.com> | 2012-12-25 20:51:50 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2012-12-25 20:51:50 +0000 |
commit | 272d35c920ff70f3a216eedf88a0152190a41867 (patch) | |
tree | c235dc93e1e57a46d3681b79b247d82038a2fffd /pp_hot.c | |
parent | 39819bd9daad8177c22032658cbd5c354aa2b92f (diff) | |
download | perl-272d35c920ff70f3a216eedf88a0152190a41867.tar.gz |
Eliminate RF_tainted flag from PL_reg_flags
This global flag is cleared at the start of execution, and then set if
any locale-based nodes are executed. At the end of execution, the
RXf_TAINTED_SEEN flag on the regex is set/cleared based on RF_tainted.
We eliminate RF_tainted by simply directly setting RXf_TAINTED_SEEN
each time a taintable node is executed.
This is the final step before eliminating PL_reg_flags.
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -2084,12 +2084,11 @@ the pattern is marked as tainted. This means that subsequent usage, such as /x$r/, will set PL_tainted using TAINT_set, and thus RXf_TAINTED, on the new pattern too. -During execution of a pattern, locale-variant ops such as ALNUML set the -local flag RF_tainted. At the end of execution, the engine sets the -RXf_TAINTED_SEEN on the pattern if RF_tainted got set, or clears it -otherwise. +At the start of execution of a pattern, the RXf_TAINTED_SEEN flag on the +regex is cleared; during execution, locale-variant ops such as ALNUML may +set RXf_TAINTED_SEEN. -In addition, RXf_TAINTED_SEEN is used post-execution by the get magic code +RXf_TAINTED_SEEN is used post-execution by the get magic code of $1 et al to indicate whether the returned value should be tainted. It is the responsibility of the caller of the pattern (i.e. pp_match, pp_subst etc) to set this flag for any other circumstances where $1 needs |