# New Ticket Created by Andreas Guldstrand
# Please include the string: [perl #123495]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=123495 >
This is a bug report for perl from [email protected],
generated with the help of perlbug 1.40 running under perl 5.20.1.
-----------------------------------------------------------------
[Please describe your issue here]
Running gmtime("NaN"); in void or scalar context causes a segmentation fault
[0][email protected]:~$ perl -e'gmtime("NaN")'
Segmentation fault
[139]suppy@luna:~$ perl -e'$foo = gmtime("NaN")'
Segmentation fault
[139]s[email protected]:~$ perl -e'@foo = gmtime("NaN")'
[0][email protected]:~$
This appears to happen on all released perls since 5.12 (inclusive):
[0]suppy@luna:~$ for perl in ~/perl5/perlbrew/perls/perl-*/bin/perl;
do $perl -v | grep "This is perl"; $perl -e'gmtime("NaN")'; echo "^ -
$? #########"; done
This is perl, v5.10.0 built for x86_64-linux
^ - 0 #########
This is perl, v5.10.1 (*) built for x86_64-linux
^ - 0 #########
This is perl 5, version 12, subversion 0 (v5.12.0) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 12, subversion 1 (v5.12.1) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 12, subversion 2 (v5.12.2) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 12, subversion 3 (v5.12.3) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 12, subversion 4 (v5.12.4) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 12, subversion 5 (v5.12.5) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 14, subversion 0 (v5.14.0) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 14, subversion 1 (v5.14.1) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 14, subversion 3 (v5.14.3) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 14, subversion 4 (v5.14.4) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 16, subversion 0 (v5.16.0) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 16, subversion 1 (v5.16.1) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 16, subversion 2 (v5.16.2) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 18, subversion 0 (v5.18.0) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 18, subversion 1 (v5.18.1) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 18, subversion 3 (v5.18.3) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 18, subversion 4 (v5.18.4) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 20, subversion 0 (v5.20.0) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl 5, version 20, subversion 1 (v5.20.1) built for x86_64-linux
Segmentation fault
^ - 139 #########
This is perl, v5.6.0 built for x86_64-linux
^ - 0 #########
This is perl, v5.6.1 built for x86_64-linux
^ - 0 #########
This is perl, v5.6.2 built for x86_64-linux
^ - 0 #########
This is perl, v5.8.0 built for x86_64-linux
^ - 0 #########
This is perl, v5.8.1 built for x86_64-linux
^ - 0 #########
This is perl, v5.8.2 built for x86_64-linux
^ - 0 #########
This is perl, v5.8.3 built for x86_64-linux
^ - 0 #########
This is perl, v5.8.4 built for x86_64-linux
^ - 0 #########
This is perl, v5.8.5 built for x86_64-linux
^ - 0 #########
This is perl, v5.8.6 built for x86_64-linux
^ - 0 #########
This is perl, v5.8.7 built for x86_64-linux
^ - 0 #########
This is perl, v5.8.8 built for x86_64-linux
^ - 0 #########
This is perl, v5.8.9 built for x86_64-linux
^ - 0 #########
[0][email protected]:~$
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl 5.20.1:
Configured by suppy at Sat Dec 20 16:42:13 CET 2014.
Summary of my perl5 (revision 5 version 20 subversion 1) configuration:
Platform:
osname=linux, osvers=3.10.17, archname=x86_64-linux
uname='linux luna 3.10.17 #2 smp fri feb 14 16:45:28 cst 2014
x86_64 intel(r) core(tm) i5-2450m cpu @ 2.50ghz genuineintel gnulinux
'
config_args='-de
-Dprefix=/home/suppy/perl5/perlbrew/perls/perl-5.20.1
-Aeval:scriptdir=/home/suppy/perl5/perlbrew/perls/perl-5.20.1/bin'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include'
ccversion='', gccversion='4.8.2', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/include-fixed /usr/lib
/lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64
/usr/local/lib64
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.17.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.17'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib
-fstack-protector'
---
@INC for perl 5.20.1:
/home/suppy/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux
/home/suppy/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1
/home/suppy/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_64-linux
/home/suppy/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1
.
---
Environment for perl 5.20.1:
HOME=/home/suppy
LANG=en_GB.UTF-8
LANGUAGE (unset)
LC_ALL=en_GB.UTF-8
LC_COLLATE=C
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/suppy/perl5/perlbrew/bin:/home/suppy/perl5/perlbrew/perls/perl-5.20.1/bin:/home/suppy/.commands/:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/kde4/libexec:/usr/lib64/qt/bin:/usr/share/texmf/bin
PERLBREW_BASHRC_VERSION=0.64
PERLBREW_HOME=/home/suppy/.perlbrew
PERLBREW_MANPATH=/home/suppy/perl5/perlbrew/perls/perl-5.20.1/man
PERLBREW_PATH=/home/suppy/perl5/perlbrew/bin:/home/suppy/perl5/perlbrew/perls/perl-5.20.1/bin
PERLBREW_PERL=perl-5.20.1
PERLBREW_ROOT=/home/suppy/perl5/perlbrew
PERLBREW_VERSION=0.64
PERL_BADLANG (unset)
SHELL=/bin/bash