In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/1dffc4d1a24556f4e23f612d6713492847ff064b?hp=2b78b7715e1330aaceb5d16e6de25abbe8fde06c>
- Log ----------------------------------------------------------------- commit 1dffc4d1a24556f4e23f612d6713492847ff064b Author: Nicholas Clark <[email protected]> Date: Mon May 4 18:12:03 2009 +0100 Fix SEGVs when cloning a typeglob that has been undefined. (RT #64954) ----------------------------------------------------------------------- Summary of changes: sv.c | 2 +- t/op/threads.t | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sv.c b/sv.c index 7d2eae5..b13985b 100644 --- a/sv.c +++ b/sv.c @@ -10505,7 +10505,7 @@ Perl_gp_dup(pTHX_ GP *const gp, CLONE_PARAMS *const param) ret->gp_cv = cv_dup_inc(gp->gp_cv, param); ret->gp_cvgen = gp->gp_cvgen; ret->gp_line = gp->gp_line; - ret->gp_file_hek = hek_dup(gp->gp_file_hek, param); + ret->gp_file_hek = gp->gp_file_hek ? hek_dup(gp->gp_file_hek, param) : NULL; return ret; } diff --git a/t/op/threads.t b/t/op/threads.t index 814b595..c8ed34a 100644 --- a/t/op/threads.t +++ b/t/op/threads.t @@ -16,7 +16,7 @@ BEGIN { exit 0; } - plan(13); + plan(14); } use strict; @@ -185,5 +185,10 @@ threads->new(\&safe_re)->join(); # tests in threads don't get counted, so curr_test(curr_test() + 1); +# This used to crash in 5.10.0 [perl #64954] + +undef *a; +threads->new(sub {})->join; +pass("undefing a typeglob doesn't cause a crash during cloning"); # EOF -- Perl5 Master Repository
