Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] add warnings 7fatal testcase for #123398 #14670

Closed
p5pRT opened this issue Apr 23, 2015 · 7 comments
Closed

[PATCH] add warnings 7fatal testcase for #123398 #14670

p5pRT opened this issue Apr 23, 2015 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 23, 2015

Migrated from rt.perl.org#124370 (status was 'resolved')

Searchable as RT124370$

@p5pRT
Copy link
Author

p5pRT commented Apr 23, 2015

From @rurban

This is a bug report for perl from rurban@​cpanel.net,
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 <rurban@​cpanel.net>
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(+)

Inline Patch
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;
+undef($foo);
+EXPECT
+	(in cleanup) Can't call method "missing_method" on an undefined value at - line 11.
-- 
2.1.4

Flags​:
  category=library
  severity=medium
  module=warnings


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
  Platform​:
  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
  Compiler​:
  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
  libc=libc-2.19.so, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.19'
  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​:
  lib
  /usr/local/lib/perl5/site_perl/5.19.11/x86_64-linux
  /usr/local/lib/perl5/site_perl/5.19.11
  /usr/local/lib/perl5/5.19.11/x86_64-linux
  /usr/local/lib/perl5/5.19.11
  .


Environment for perl 5.21.9​:
  HOME=/home/rurban
  LANG=en_US.utf8
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/home/rurban/bin​:/usr/local/bin​:/usr/bin​:/bin​:/usr/local/games​:/usr/games
  PERL_BADLANG (unset)
  SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Jun 9, 2015

From @tonycoz

On Thu Apr 23 04​:07​:29 2015, rurban@​cpanel.net wrote​:

This is a bug report for perl from rurban@​cpanel.net,
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 <rurban@​cpanel.net>
Date​: Thu, 23 Apr 2015 13​:04​:05 +0200
Subject​: [PATCH] add warnings 7fatal testcase for #123398

Thanks, applied as 04ac80c41ac62f54dd26df5f70955181c2a2349b.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jun 9, 2015

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jun 9, 2015

@tonycoz - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented Jun 9, 2015

From @tonycoz

On Mon Jun 08 22​:26​:11 2015, tonyc wrote​:

On Thu Apr 23 04​:07​:29 2015, rurban@​cpanel.net wrote​:

This is a bug report for perl from rurban@​cpanel.net,
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 <rurban@​cpanel.net>
Date​: Thu, 23 Apr 2015 13​:04​:05 +0200
Subject​: [PATCH] add warnings 7fatal testcase for #123398

Thanks, applied as 04ac80c41ac62f54dd26df5f70955181c2a2349b.

I missed pushing it, so it ended up as 4221d7c.

Tony

@p5pRT
Copy link
Author

p5pRT commented May 13, 2016

From @khwilliamson

Thank you for submitting this report. You have helped make Perl better.
 
With the release of Perl 5.24.0 on May 9, 2016, this and 149 other issues have been resolved.

Perl 5.24.0 may be downloaded via https://metacpan.org/release/RJBS/perl-5.24.0

@p5pRT
Copy link
Author

p5pRT commented May 13, 2016

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant