develooper Front page | perl.perl5.porters | Postings from April 2015

[perl #124370] [PATCH] add warnings 7fatal testcase for #123398

rurban @ cpanel . net
April 23, 2015 11:08
[perl #124370] [PATCH] add warnings 7fatal testcase for #123398
Message ID:
# New Ticket Created by 
# Please include the string:  [perl #124370]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
generated with the help of perlbug 1.40 running under perl 5.21.9.

>From 09488421cf4af21111fabf99d97ddfa984c5e26d Mon Sep 17 00:00:00 2001
From: Reini Urban <>
Date: Thu, 23 Apr 2015 13:04:05 +0200
Subject: [PATCH] add warnings 7fatal testcase for #123398

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

diff --git t/lib/warnings/7fatal t/lib/warnings/7fatal
index 87f3fd0..40c649f 100644
--- t/lib/warnings/7fatal
+++ 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;
+	(in cleanup) Can't call method "missing_method" on an undefined value at - line 11.

Site configuration information for perl 5.21.9:

Configured by rurban at Mon Feb 16 13:23:45 CET 2015.

Summary of my perl5 (revision 5 version 21 subversion 9) configuration:
  Commit id: 87c3212bd01880fc80afc73aaa8ab52ad0fdc7db
    osname=linux, osvers=3.16.0-4-amd64, archname=x86_64-linux
    uname='linux reini 3.16.0-4-amd64 #1 smp debian 3.16.7-ckt2-1 (2014-12-08) x86_64 gnulinux '
    config_args='-sder -Dusedevel -DDEBUGGING -Dcc=ccache gcc-5.0 -Accflags=-mcrc32 -march=native -Dinstallman1dir=none -Dinstallman3dir=none -Dinstallsiteman1dir=none -Dinstallsiteman3dir=none -Doptimize=-O2 -g3 -Accflags=-DPERL_HASH_FUNC_ONE_AT_A_TIME_HARD'
    hint=previous, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    cc='ccache gcc-5.0', ccflags ='-DPERL_HASH_FUNC_ONE_AT_A_TIME_HARD -mcrc32 -march=native -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fwrapv',
    optimize='-O2 -g3',
    cppflags='-mcrc32 -march=native -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -DPERL_HASH_FUNC_ONE_AT_A_TIME_HARD -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -fwrapv'
    ccversion='', gccversion='5.0.0 20150103 (experimental)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='ccache gcc-5.0', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64 /usr/local/lib64 /usr/local/lib /usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include-fixed /usr/include/x86_64-linux-gnu /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g3 -L/usr/local/lib -fstack-protector'

@INC for perl 5.21.9:

Environment for perl 5.21.9:
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)
    SHELL=/bin/bash Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About