This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make OP_REGCRESET only for taint handling
authorDavid Mitchell <davem@iabyn.com>
Sun, 1 Apr 2012 09:21:22 +0000 (10:21 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 13 Jun 2012 12:32:52 +0000 (13:32 +0100)
commit7fb31b92fa6bf56dff7d4240b7051b9158f7df43
treecb2fe1506c53cfe2abf404f54b56ac4c9684aa49
parent26c9400e9b634bcd86978c2b31af8d69520826a8
make OP_REGCRESET only for taint handling

The OP_REGCRESET op, which is sometimes prepended to the chain of ops
leading to OP_REGCOMP, currently serves two purposes; first to reset the
taint flag, and second to initialise PL_reginterp_cnt. The second purpose
is no longer needed, and the first has a bug, in that the op isn't
prepended when "use re 'eval'" is in scope.

Fix this by prepending the op solely when PL_tainting is in effect.
This also makes run-time regexes slightly more efficient in the
non-tainting case.
dist/B-Deparse/Deparse.pm
op.c
t/op/taint.t