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

[perl #134291] $@ = 100; die $@ doesn't propagate 100

From:
Tony Cook
Date:
July 17, 2019 01:07
Subject:
[perl #134291] $@ = 100; die $@ doesn't propagate 100
Message ID:
rt-4.0.24-9058-1563325634-854.134291-75-0@perl.org
# New Ticket Created by  Tony Cook 
# Please include the string:  [perl #134291]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=134291 >


This is a bug report for perl from tony@develop-help.com
generated with the help of perlbug 1.41 running under perl 5.31.2

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

toddr pointed this out in IRC:

05:50 < toddr> TonyC after 8b3945e7b7b7ae6fd2369864ebe169bd9a91cf4e, the output 
               of this changed: perl -e '$@ = 123; die' 
05:50 < toddr> is that a bug?
05:51 < toddr> If it's not an IV, then you get different output.

Similarly for NVs.

tony@mars:.../git/perl$ ./perl -e '$@ = 123; die'
Died at -e line 1.
tony@mars:.../git/perl$ ./perl -e '$@ = "123"; die'
123     ...propagated at -e line 1.
tony@mars:.../git/perl$ ./perl -e '$@ = 3.14; die'
Died at -e line 1.

Patch soon

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Summary of my perl5 (revision 5 version 31 subversion 2) configuration:
  Commit id: 973ae08839a3c974ff88014594ecf63cdb20d5e8
  Platform:
    osname=linux
    osvers=4.9.0-9-amd64
    archname=x86_64-linux
    uname='linux mars 4.9.0-9-amd64 #1 smp debian 4.9.168-1+deb9u3 (2019-06-16) x86_64 gnulinux '
    config_args='-des -Dusedevel -Doptimize=-O0 -g -DDEBUGGING'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=undef
    usemultiplicity=undef
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='cc'
    ccflags ='-fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
    optimize='-O0 -g'
    cppflags='-fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='6.3.0 20170516'
    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='cc'
    ldflags =' -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/6/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
    libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.24.so
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.24'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags='-shared -O0 -g -L/usr/local/lib -fstack-protector-strong'


Characteristics of this binary (from libperl): 
  Compile-time options:
    DEBUGGING
    HAS_TIMES
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_USE_DEVEL
    USE_64_BIT_ALL
    USE_64_BIT_INT
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
  Locally applied patches:
    uncommitted-changes
  Built under linux
  Compiled at Jul 17 2019 10:48:14
  %ENV:
    PERLBREW_BASHRC_VERSION="0.43"
    PERLBREW_HOME="/home/tony/.perlbrew"
    PERLBREW_MANPATH=""
    PERLBREW_PATH="/home/tony/perl5/perlbrew/bin"
    PERLBREW_ROOT="/home/tony/perl5/perlbrew"
    PERLBREW_VERSION="0.67"
  @INC:
    lib
    /usr/local/lib/perl5/site_perl/5.31.2/x86_64-linux
    /usr/local/lib/perl5/site_perl/5.31.2
    /usr/local/lib/perl5/5.31.2/x86_64-linux
    /usr/local/lib/perl5/5.31.2




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