develooper Front page | perl.perl5.porters | Postings from July 2019

[perl #134292] die does not display $@ when it's an IV

Thread Previous
From:
Todd Rinaldo
Date:
July 17, 2019 02:21
Subject:
[perl #134292] die does not display $@ when it's an IV
Message ID:
rt-4.0.24-8868-1563330091-1529.134292-75-0@perl.org
# New Ticket Created by  Todd Rinaldo 
# Please include the string:  [perl #134292]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=134292 >


This is a bug report for perl from toddr@cpan.org,
generated with the help of perlbug 1.41 running under perl 5.28.0.


-----------------------------------------------------------------
[Please describe your issue here]

We noticed today that die will not display $@ if it's an IV

$>perl -e'$@ = 123; die'
Died at -e line 1.

$>perl -e'$@ = "123"; die'
123    ...propagated at -e line 1.

I bisected it to a change just before 5.18:

8b3945e7b7b7ae6fd2369864ebe169bd9a91cf4e is the first bad commit
commit 8b3945e7b7b7ae6fd2369864ebe169bd9a91cf4e
Author: Tony Cook <tony@develop-help.com>
Date: Fri Apr 26 09:56:58 2013 +1000

    [perl #117743] don't warn on $@ = undef; die;

and fix the test that's meant to detect this bug.

:100644 100644 8bf9fa7cf13daf5e5461c945266a9579c5ac0590
04ccddb9ab6a733eb4ac3453f6ccdd3a0a54fbcb M pp_sys.c
:040000 040000 6f31b960f19e960499385dbf0d1b9d96c77841c6
9795097c2f12735bdfd390742047ace3d0dc48ca M t


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=low
---
Site configuration information for perl 5.28.0:

Configured by cPanel at Fri Feb 15 18:56:31 CST 2019.

Summary of my perl5 (revision 5 version 28 subversion 0) configuration:

  Platform:
    osname=linux
    osvers=3.10.0-123.20.1.el7.x86_64
    archname=x86_64-linux-64int
    uname='linux rpmbuild-64-centos-7.dev.cpanel.net
3.10.0-123.20.1.el7.x86_64 #1 smp thu jan 29 18:05:33 utc 2015 x86_64
x86_64 x86_64 gnulinux '
    config_args='-des -Dusedevel -Darchname=x86_64-linux-64int
-Dcc=/usr/bin/gcc -Dcpp=/usr/bin/cpp -Dusemymalloc=n -DDEBUGGING=none
-Doptimize=-Os -Accflags=-m64 -Dccflags=-DPERL_DISABLE_PMC -fPIC -DPIC
-Duseshrplib -Duselargefiles=yes -Duseposix=true -Dhint=recommended
-Duseperlio=yes -Dprefix=/usr/local/cpanel/3rdparty/perl/528
-Dsiteprefix=/opt/cpanel/perl5/528 -Dsitebin=/opt/cpanel/perl5/528/bin
-Dsitelib=/opt/cpanel/perl5/528/site_lib -Dusevendorprefix=true
-Dvendorbin=/usr/local/cpanel/3rdparty/perl/528/bin
-Dvendorprefix=/usr/local/cpanel/3rdparty/perl/528/lib/perl5
-Dvendorlib=/usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib
-Dprivlib=/usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0
-Dman1dir=none -Dman3dir=none
-Dscriptdir=/usr/local/cpanel/3rdparty/perl/528/bin
-Dscriptdirexp=/usr/local/cpanel/3rdparty/perl/528/bin
-Dsiteman1dir=none -Dsiteman3dir=none
-Dinstallman1dir=none -Dversiononly=no -Dinstallusrbinperl=no
-Dcf_by=cPanel -Dmyhostname=localhost -Dperladmin=root@localhost
-Dcf_email=support@cpanel.net -DDB_File=true -Ud_dosuid
-Uuserelocatableinc -Umad -Uusethreads -Uusemultiplicity -Uusesocks
-Uuselongdouble -Duse64bitint -Uuse64bitall'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=undef
    usemultiplicity=undef
    use64bitint=define
    use64bitall=undef
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='/usr/bin/gcc'
    ccflags ='-DPERL_DISABLE_PMC -fPIC -DPIC -m64 -fwrapv
-fno-strict-aliasing -pipe -fstack-protector-strong
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_FORTIFY_SOURCE=2'
    optimize='-Os'
    cppflags='-DPERL_DISABLE_PMC -fPIC -DPIC -m64 -fwrapv
-fno-strict-aliasing -pipe -fstack-protector-strong
-I/usr/local/include'
    ccversion=''
    gccversion='4.8.2 20140120 (Red Hat 4.8.2-16)'
    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='/usr/bin/gcc'
    ldflags =' -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib /lib/../lib64 /usr/lib/../lib64
/lib /lib64 /usr/lib64 /usr/local/lib64
    libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.17.so
    so=so
    useshrplib=true
    libperl=libperl.so
    gnulibc_version='2.17'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E
-Wl,-rpath,/usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/x86_64-linux-64int/CORE'
    cccdlflags='-fPIC'
    lddlflags='-shared -Os -L/usr/local/lib -fstack-protector-strong'

Locally applied patches:
    cPanel - disable man installs
    cPanel - cPanel INC PATH
    cPanel - Avoid importing symbols unless requested
    cPanel - Disable termcap warning when TERM is unset
    cPanel - Do not warn when close fails because the file handle is
    cPanel - COW Static support
    cPanel - Use dup2 from Cpanel::POSIX::Tiny
    cPanel - Disable 14fileno.t tests since Cpanel::POSIX::Tiny is
    cPanel - Avoid use vars when our will do in Core Perl
    cPanel - add Perl_DeclareStaticMemory
    cPanel - Disable xs handshake
    cPanel - Provide a way to clear swash invlists for B::C
    cPanel - Switch several CPAN modules to XSLoader
    cPanel - BC Static shared memory for single malloc
    cPanel - Hard code frequent Config checks so it's not needed
    cPanel - Storable do not load Fcntl
    cPanel - Optimize File::Find performance for backup metadata
    cPanel - Reduce Scalar::Utils regex overhead
    cPanel - skip shadow call when euid > 0 on linux
    cPanel - Fix warning from Memoize::Expire
    cPanel - =?UTF-8?q?Allow=20=E2=80=9Cpeer=E2=80=9D=20to=20be?=
    cPanel - Remove use vars from Digest::
    cPanel - Remove launcher regex in Config.pm
    cPanel - Change method of generating names for non-existent user
    cPanel - BC extra protection in Perl_sv_vcatpvfn_flags
    cPanel - Fix Getopt::Long version number to be 2.50 not 2.5
    cPanel - Reduce startup size of PL_strtab
    cPanel - Perl_my_setenv(); handle integer wrap
    cPanel - add test for CVE-2018-12015 (RT #133250)
    cPanel - PATCH: [perl #133423
    cPanel - (perl #133314) always close the directory handle on
    cPanel - CPAN::Config use manual install as default for root
    cPanel - Avoid a warning when prompting install_help intro
    cPanel - Avoid a warning from cpan when run with warnings

---
@INC for perl 5.28.0:
    /usr/local/cpanel
    /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib/x86_64-linux-64int
    /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib
    /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/x86_64-linux-64int
    /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0
    /opt/cpanel/perl5/528/site_lib/x86_64-linux-64int
    /opt/cpanel/perl5/528/site_lib

---
Environment for perl 5.28.0:
    HOME=/root
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/cpanel/bin:/usr/local/cpanel/3rdparty/bin:/usr/local/cpanel/3rdparty/perl/528/bin:/usr/local/cpanel/3rdparty/perl/528/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/cpanel/perl5/528/bin
    PERL_BADLANG (unset)
    PERL_USE_UNSAFE_INC=0
    SHELL=/bin/zsh


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About