Message-ID: <15892.50791.692636.982873@syllepsis.MIT.EDU>
Plus a test by Jarkko
Integrated from changes 18444 and 18446 from maint-5.8
p4raw-id: //depot/perl@18485
p4raw-branched: from //depot/maint-5.8/perl@18484 'branch in'
t/op/readline.t
p4raw-integrated: from //depot/maint-5.8/perl@18446 'merge in' MANIFEST
(@18436..)
p4raw-integrated: from //depot/maint-5.8/perl@18444 'merge in' pp_hot.c
(@18173..)
t/op/rand.t See if rand works
t/op/range.t See if .. works
t/op/read.t See if read() works
+t/op/readline.t See if <> / readline work
t/op/readdir.t See if readdir() works
t/op/recurse.t See if deep recursion works
t/op/ref.t See if refs and objects work
report_evil_fh(PL_last_in_gv, io, PL_op->op_type);
}
if (gimme == G_SCALAR) {
+ /* undef TARG, and push that undefined value */
+ SV_CHECK_THINKFIRST_COW_DROP(TARG);
(void)SvOK_off(TARG);
PUSHTARG;
}
}
}
if (gimme == G_SCALAR) {
+ SV_CHECK_THINKFIRST_COW_DROP(TARG);
(void)SvOK_off(TARG);
SPAGAIN;
PUSHTARG;
--- /dev/null
+#!./perl
+
+BEGIN {
+ chdir 't';
+ @INC = '../lib';
+ require './test.pl';
+}
+
+plan tests => 1;
+
+eval { for (\2) { $_ = <FH> } };
+like($@, 'Modification of a read-only value attempted', '[perl #19566]');
+