In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/51c78f1b91bbcd7a261c4a5d75b0d6f66140edca?hp=89eabf381ec4b8288c2951cdef48da0abbac31fd>

- Log -----------------------------------------------------------------
commit 51c78f1b91bbcd7a261c4a5d75b0d6f66140edca
Author: Peter Martini <petercmart...@gmail.com>
Date:   Tue Jun 18 00:07:05 2013 -0400

    Upgrade cv_flags_t from 16 to 32 bits.
    
    Its main use is in a struct otherwise filled with pointers, which
    means on 32-bit architectures its almost certainly taking up 32
    bits anyway.

M       sv.h

commit 07b2687d22462e599adb759b7c0082fb12b3f33d
Author: Lukas Mai <l....@web.de>
Date:   Tue Jun 18 09:51:32 2013 +0200

    don't crash on deep recursion warnings in lexical subs (#118521)

M       pp_hot.c
M       t/op/lexsub.t

commit 6daa8d508141a8730166526fd60c532162680a2f
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jun 16 06:52:35 2013 -0700

    subst.t: Rename test
    
    This was copied and pasted from the previous test.

M       t/re/subst.t

commit ce6a2be471f129b02ee821e8da34a9ff9d291921
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sat Jun 15 07:34:14 2013 -0700

    concat2.t: Unskip an encoding.pm test
    
    We should still test that it doesn’t crash, even if it
    is deprecated.

M       t/op/concat2.t
-----------------------------------------------------------------------

Summary of changes:
 pp_hot.c       | 11 +++++++++--
 sv.h           |  2 +-
 t/op/concat2.t |  2 +-
 t/op/lexsub.t  | 10 +++++++++-
 t/re/subst.t   |  2 +-
 5 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/pp_hot.c b/pp_hot.c
index e19776b..c493d40 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2895,8 +2895,15 @@ Perl_sub_crush_depth(pTHX_ CV *cv)
     if (CvANON(cv))
        Perl_warner(aTHX_ packWARN(WARN_RECURSION), "Deep recursion on 
anonymous subroutine");
     else {
-       SV* const tmpstr = sv_newmortal();
-       gv_efullname3(tmpstr, CvGV(cv), NULL);
+        HEK *const hek = CvNAME_HEK(cv);
+        SV *tmpstr;
+        if (hek) {
+            tmpstr = sv_2mortal(newSVhek(hek));
+        }
+        else {
+            tmpstr = sv_newmortal();
+            gv_efullname3(tmpstr, CvGV(cv), NULL);
+        }
        Perl_warner(aTHX_ packWARN(WARN_RECURSION), "Deep recursion on 
subroutine \"%"SVf"\"",
                    SVfARG(tmpstr));
     }
diff --git a/sv.h b/sv.h
index 449b23e..b0fd5b2 100644
--- a/sv.h
+++ b/sv.h
@@ -531,7 +531,7 @@ struct xpvgv {
     union _xnvu xnv_u;
 };
 
-typedef U16 cv_flags_t;
+typedef U32 cv_flags_t;
 
 #define _XPVCV_COMMON                                                          
\
     HV *       xcv_stash;                                                      
\
diff --git a/t/op/concat2.t b/t/op/concat2.t
index cc6a541..9dfcc5b 100644
--- a/t/op/concat2.t
+++ b/t/op/concat2.t
@@ -15,8 +15,8 @@ plan 3;
 
 SKIP: {
 skip_if_miniperl("no dynamic loading on miniperl, no Encode", 1);
-skip('encoding pragma is deprecated', 1) if $] >= 5.017009;
 fresh_perl_is <<'end', "ok\n", {},
+    no warnings 'deprecated';
     use encoding 'utf8';
     map { "a" . $a } ((1)x5000);
     print "ok\n";
diff --git a/t/op/lexsub.t b/t/op/lexsub.t
index d70f2cc..27b6de7 100644
--- a/t/op/lexsub.t
+++ b/t/op/lexsub.t
@@ -8,7 +8,7 @@ BEGIN {
     *bar::like = *like;
 }
 no warnings 'deprecated';
-plan 134;
+plan 135;
 
 # -------------------- Errors with feature disabled -------------------- #
 
@@ -695,3 +695,11 @@ eval 'sub not_lexical7 { my @x }';
     }
   }
 }
+
+like runperl(
+      switches => [ '-Mfeature=:all', '-Mwarnings=FATAL,all', 
'-M-warnings=experimental::lexical_subs' ],
+      prog     => 'my sub foo; sub foo { foo } foo',
+      stderr   => 1
+     ),
+     qr/Deep recursion on subroutine "foo"/,
+    'deep recursion warnings for lexical subs do not crash';
diff --git a/t/re/subst.t b/t/re/subst.t
index 8acd54f..c1e0d03 100644
--- a/t/re/subst.t
+++ b/t/re/subst.t
@@ -863,7 +863,7 @@ $_ = "hello";
     local *a = *1;
     s/e(.)\1/a$a/g;
 }
-is $_, 'halo', 's/pat/$alias_to_match_var/';
+is $_, 'halo', 's/pat/foo$alias_to_match_var/';
 # Last-used pattern containing re-evals that modify "constant" rhs
 {
     local *a;

--
Perl5 Master Repository

Reply via email to