On Sat, Nov 19, 2011 at 05:35:20PM +0100, Zefram wrote: > In perl.git, the branch blead has been updated > > <http://perl5.git.perl.org/perl.git/commitdiff/676a678ac0683a727a07d56ed1a6e1fb59085d5a?hp=fde67290e2c173e19d166b4f9a9514f6f16dbb75> > > - Log ----------------------------------------------------------------- > commit 676a678ac0683a727a07d56ed1a6e1fb59085d5a > Author: Zefram <zefram@fysh.org> > Date: Sat Nov 19 16:00:32 2011 +0000 > > narrower localisation of PL_compcv around eval > > PL_compcv used to be localised around the entire string eval process, > and hence at runtime of the evaled code would refer to the evaled code > rather than code of a surrounding compilation. This interfered with the > ability of string-evaled code in a BEGIN block to affect the surrounding > compilation, in a similar way to the localisation of $^H and %^H that > was fixed in f45b078d20. > > Similar to the fix there, this change moves the localisation of PL_compcv > inside the new evalcomp scope. A couple of things were relying on > PL_compcv to find the running code when in a string-eval scope; they now > need to find it from cx->blk_eval.cv, which was already being populated. > ----------------------------------------------------------------------- This change appears to have broken fork.t on Win32: C:\Users\tony\dev\perl\git\perl\t>git log -n1 WARNING: terminal is not fully functional commit 676a678ac0683a727a07d56ed1a6e1fb59085d5a Author: Zefram <zefram@fysh.org> Date: Sat Nov 19 16:00:32 2011 +0000 narrower localisation of PL_compcv around eval PL_compcv used to be localised around the entire string eval process, and hence at runtime of the evaled code would refer to the evaled code rather than code of a surrounding compilation. This interfered with the ability of string-evaled code in a BEGIN block to affect the surrounding compilation, in a similar way to the localisation of $^H and %^H that was fixed in f45b078d20. Similar to the fix there, this change moves the localisation of PL_compcv inside the new evalcomp scope. A couple of things were relying on PL_compcv to find the running code when in a string-eval scope; they now need to find it from cx->blk_eval.cv, which was already being populated. C:\Users\tony\dev\perl\git\perl\t>.\perl harness -v op/fork.t op/fork.t .. ok 1 ok 2 ok 3 ok 4 ok 5 ok 6 ok 7 ok 8 ok 9 ok 10 ok 11 ok 12 ok 13 ok 14 ok 15 (windows complains about a crashed program) PROG: if (eval q{$pid = fork}) { eval q{ die "parent died" }; print $@; } else { eval q{ die "child died" }; print $@; } EXPECTED: parent died at (eval 2) line 1. child died at (eval 2) line 1. GOT: # Failed at ./test.pl line 1033 not ok 16 ok 17 ok 18 ok 19 ok 20 ok 21 ok 22 ok 23 ok 24 ok 25 1..25 Failed 1/25 subtests Test Summary Report ------------------- op/fork.t (Wstat: 0 Tests: 25 Failed: 1) Failed test: 16 Files=1, Tests=25, 18 wallclock secs ( 0.02 usr + 0.02 sys = 0.03 CPU) Result: FAIL C:\Users\tony\dev\perl\git\perl\t>cd .. C:\Users\tony\dev\perl\git\perl>git clean -dxf C:\Users\tony\dev\perl\git\perl>git checkout "676a678ac0683a727a07d56ed1a6e1fb59 085d5a^" Previous HEAD position was 676a678... narrower localisation of PL_compcv around eval HEAD is now at fde6729... sv.c: More consistent use of spaces after dots C:\Users\tony\dev\perl\git\perl>cd win32 C:\Users\tony\dev\perl\git\perl\win32>dmake test-prep (noise removed) C:\Users\tony\dev\perl\git\perl\win32>cd ..\t C:\Users\tony\dev\perl\git\perl\t>.\perl harness -v op/fork.t op/fork.t .. ok 1 ok 2 ok 3 ok 4 ok 5 ok 6 ok 7 ok 8 ok 9 ok 10 ok 11 ok 12 ok 13 ok 14 ok 15 ok 16 ok 17 ok 18 ok 19 ok 20 ok 21 ok 22 ok 23 ok 24 ok 25 1..25 ok All tests successful. Files=1, Tests=25, 14 wallclock secs ( 0.02 usr + 0.03 sys = 0.05 CPU) Result: PASS TonyThread Next