Front page | perl.perl5.changes |
Postings from January 2012
[perl.git] branch blead, updated. v5.15.6-587-g485495c
From:
Father Chrysostomos
Date:
January 17, 2012 21:25
Subject:
[perl.git] branch blead, updated. v5.15.6-587-g485495c
Message ID:
E1RnO1n-0004bp-S4@camel.ams6.corp.booking.com
In perl.git, the branch blead has been updated
<http://perl5.git.perl.org/perl.git/commitdiff/485495c37ef9e4aac088b1f65dff57b9b274003c?hp=c6fb3f6e3e5160581b78d87d4c62f42ef3cc0db5>
- Log -----------------------------------------------------------------
commit 485495c37ef9e4aac088b1f65dff57b9b274003c
Author: Father Chrysostomos <sprout@cpan.org>
Date: Tue Jan 17 20:35:24 2012 -0800
perldelta for last two fixes
M pod/perldelta.pod
commit ba510004112153622a7319559c8ca952193b3b8b
Author: Father Chrysostomos <sprout@cpan.org>
Date: Tue Jan 17 20:33:28 2012 -0800
Don’t crash on @a =~ // warning
This is similar to bug #106726, caused by 579333ee9e3 and fixed
by c6fb3f6.
This bug was caused by c6771ab63d, which had exactly the same mistake.
Attempting to use find_runcv at compile time to find a variable name
is not going to work in general. It only works by accident some
of the time.
M op.c
M t/re/pat.t
-----------------------------------------------------------------------
Summary of changes:
op.c | 4 +++-
pod/perldelta.pod | 5 +++++
t/re/pat.t | 9 ++++++++-
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/op.c b/op.c
index a1f5d25..2b7bc37 100644
--- a/op.c
+++ b/op.c
@@ -2535,7 +2535,9 @@ Perl_bind_match(pTHX_ I32 type, OP *left, OP *right)
&& (gv = cGVOPx_gv(cUNOPx(left)->op_first))
? varname(gv, isary ? '@' : '%', 0, NULL, 0, 1)
: NULL
- : varname(NULL, isary ? '@' : '%', left->op_targ, NULL, 0, 1);
+ : varname(
+ (GV *)PL_compcv, isary ? '@' : '%', left->op_targ, NULL, 0, 1
+ );
if (name)
Perl_warner(aTHX_ packWARN(WARN_MISC),
"Applying %s to %"SVf" will act on scalar(%"SVf")",
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index dc7ac99..bb082de 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -972,6 +972,11 @@ C<lstat> is documented to fall back to C<stat> (with a warning) when given
a filehandle. When passed an IO reference, it was actually doing the
equivalent of S<C<stat _>> and ignoring the handle.
+=item * Crashes with warnings
+
+Two warning messages that mention variable names started crashing in
+5.15.5, but have been fixed [perl #106726].
+
=back
=head1 Known Problems
diff --git a/t/re/pat.t b/t/re/pat.t
index 54d44ac..7b03e41 100644
--- a/t/re/pat.t
+++ b/t/re/pat.t
@@ -21,7 +21,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 464; # Update this when adding/deleting tests.
+plan tests => 465; # Update this when adding/deleting tests.
run_tests() unless caller;
@@ -1215,6 +1215,13 @@ EOP
like("\xffb", qr/$pat/i, "/i: utf8 pattern, non-utf8 string, latin1-char preceding matching char in string");
}
+ { # Crash with @a =~ // warning
+ local $SIG{__WARN__} = sub {
+ pass 'no crash for @a =~ // warning'
+ };
+ eval ' sub { my @a =~ // } ';
+ }
+
} # End of sub run_tests
1;
--
Perl5 Master Repository
-
[perl.git] branch blead, updated. v5.15.6-587-g485495c
by Father Chrysostomos