diff options
author | Father Chrysostomos <sprout@cpan.org> | 2015-03-25 22:55:20 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2015-03-25 22:55:20 -0700 |
commit | ada289e74406815f75328d011e5521339169abe7 (patch) | |
tree | ea2518aac71cf995b66ea0019ed7d9f475b5bc35 /op.c | |
parent | aab1202a8d4b691b16384fb41d2e2a06abf664e2 (diff) | |
download | perl-ada289e74406815f75328d011e5521339169abe7.tar.gz |
[perl #124160] Disable targlex for state var init
The targlex optimisation optimises away an assignment to a lexical
variable, having the operator on the rhs write directly to the lexi-
cal itself. This optimisation has a bug in it (#101640) that causes
$lex = "a $b c" to stringify the result, instead of allowing con-
cat overloding to return something other than a string. I extended
the optimisation to occur with state variable initialization, in
v5.21.5-366-ga1b22ab, not realising it would make an existing bug
occur more often. For now, just disable the new optimisation.
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -10476,7 +10476,10 @@ Perl_ck_sassign(pTHX_ OP *o) | ((kkid->op_private & ~OPpLVAL_INTRO) << 8)); OP *const first = newOP(OP_NULL, 0); OP *const nullop = + newCONDOP(0, first, o, other); + /* XXX targlex disabled for now; see ticket #124160 newCONDOP(0, first, S_maybe_targlex(aTHX_ o), other); + */ OP *const condop = first->op_next; OpTYPE_set(condop, OP_ONCE); |