In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/4221d7c5eb104778a9335f0f89b12f122d99e425?hp=724fb20655e1cbd6e734c7bc2f8ad1c8e1d40c39>

- Log -----------------------------------------------------------------
commit 4221d7c5eb104778a9335f0f89b12f122d99e425
Author: Reini Urban <[email protected]>
Date:   Thu Apr 23 13:04:05 2015 +0200

    add warnings 7fatal testcase for #123398
-----------------------------------------------------------------------

Summary of changes:
 t/lib/warnings/7fatal | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/t/lib/warnings/7fatal b/t/lib/warnings/7fatal
index 87f3fd0..40c649f 100644
--- a/t/lib/warnings/7fatal
+++ b/t/lib/warnings/7fatal
@@ -548,3 +548,21 @@ syntax error at - line 4, near "1 {"
 "my" variable $x masks earlier declaration in same statement at - line 6.
 syntax error at - line 7, near "}"
 Execution of - aborted due to compilation errors.
+########
+
+# fatal warnings in DESTROY should be made non-fatal [perl #123398]
+# This test will blow up your memory with SEGV without the patch
+package Foo;
+use strict; use utf8; use warnings FATAL => 'all';
+sub new {
+    return bless{ 'field' => undef }, 'Foo';
+}
+sub DESTROY {
+    my $self = shift;
+    $self->{'field'}->missing_method;
+}
+package main;
+my $foo = new Foo;
+undef($foo);
+EXPECT
+       (in cleanup) Can't call method "missing_method" on an undefined value 
at - line 11.

--
Perl5 Master Repository

Reply via email to