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

[perl #134441] Dumpvalue's dumpValue and dumpValues do not behavethe same way

Thread Previous
From:
Henrik Pauli
Date:
September 20, 2019 01:20
Subject:
[perl #134441] Dumpvalue's dumpValue and dumpValues do not behavethe same way
Message ID:
rt-4.0.24-17605-1568898409-1856.134441-75-0@perl.org
# New Ticket Created by  Henrik Pauli 
# Please include the string:  [perl #134441]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=134441 >


This is a bug report for perl from henrik.pauli@comnica.com,
generated with the help of perlbug 1.41 running under perl 5.28.2.

Contrary to what the manual claims, the singular and the plural form 
don't behave the same when `undef` is involved:

```perl
use v5.10;
use Dumpvalue;

my $dv = Dumpvalue->new();
my ($x, $y) = (undef, "something");

say "x = " . ($x // "<UNDEF>");
say "y = " . ($y // "<UNDEF>");
say "dumpValues(x, y):";
$dv->dumpValues($x, $y);
say "dumpValue([x, y]):";
$dv->dumpValue([$x, $y]);
```

Output:
```
x = <UNDEF>
y = something
dumpValues(x, y):
undef
dumpValue([x, y]):
0  undef
1  'something'
```

Expected output:

Both should say
```
0  undef
1  'something'
```
---
Flags:
     category=library
     severity=low
     module=Dumpvalue
---
This perlbug was built using Perl 5.28.2 - Thu Aug 22 12:32:10 UTC 2019
It is being executed now by  Perl 5.28.2 - Thu Aug 22 12:27:54 UTC 2019.

Site configuration information for perl 5.28.2:

Configured by Red Hat, Inc. at Thu Aug 22 12:27:54 UTC 2019.

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

   Platform:
     osname=linux
     osvers=5.0.6-200.fc29.x86_64
     archname=x86_64-linux-thread-multi
     uname='linux buildvm-10.phx2.fedoraproject.org 
5.0.6-200.fc29.x86_64 #1 smp wed apr 3 15:09:51 utc 2019 x86_64 x86_64 
x86_64 gnulinux '
     config_args='-des -Doptimize=none -Dccflags=-O2 -g -pipe -Wall 
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 
-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong 
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic 
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection 
-Dldflags=-Wl,-z,relro        -Wl,-z,now 
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld 
-Dccdlflags=-Wl,--enable-new-dtags -Wl,-z,relro   -Wl,-z,now 
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Dlddlflags=-shared 
-Wl,-z,relro   -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld 
-Dshrpdir=/usr/lib64 -DDEBUGGING=-g -Dversion=5.28.2 
-Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red 
Hat, Inc. -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr/local 
-Dsitelib=/usr/local/share/perl5
-Dsitearch=/usr/local/lib64/perl5 -Dprivlib=/usr/share/perl5 
-Dvendorlib=/usr/share/perl5/vendor_perl -Darchlib=/usr/lib64/perl5 
-Dvendorarch=/usr/lib64/perl5/vendor_perl 
-Darchname=x86_64-linux-thread-multi -Dlibpth=/usr/local/lib64 /lib64 
/usr/lib64 -Duseshrplib -Dusethreads -Duseithreads 
-Dusedtrace=/usr/bin/dtrace -Duselargefiles -Dd_semctl_semun -Di_db 
-Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio 
-Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly 
-Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto 
-Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto 
-Ud_endservent_r_proto -Ud_setservent_r_proto -Dscriptdir=/usr/bin 
-Dusesitecustomize -Duse64bitint'
     hint=recommended
     useposix=true
     d_sigaction=define
     useithreads=define
     usemultiplicity=define
     use64bitint=define
     use64bitall=define
     uselongdouble=undef
     usemymalloc=n
     default_inc_excludes_dot=define
     bincompat5005=undef
   Compiler:
     cc='gcc'
     ccflags ='-D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall 
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 
-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong 
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic 
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection 
-fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64'
     optimize='  -g'
     cppflags='-D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall 
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 
-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong 
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic 
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection 
-fwrapv -fno-strict-aliasing -I/usr/local/include'
     ccversion=''
     gccversion='8.3.1 20190223 (Red Hat 8.3.1-2)'
     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='gcc'
     ldflags ='-Wl,-z,relro -Wl,-z,now 
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong 
-L/usr/local/lib'
     libpth=/usr/local/lib64 /lib64 /usr/lib64 /usr/local/lib /usr/lib 
/lib/../lib64 /usr/lib/../lib64 /lib
     libs=-lpthread -lresolv -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc 
-lgdbm_compat
     perllibs=-lpthread -lresolv -ldl -lm -lcrypt -lutil -lc
     libc=libc-2.28.so
     so=so
     useshrplib=true
     libperl=libperl.so
     gnulibc_version='2.28'
   Dynamic Linking:
     dlsrc=dl_dlopen.xs
     dlext=so
     d_dlsymun=undef
     ccdlflags='-Wl,--enable-new-dtags -Wl,-z,relro -Wl,-z,now 
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
     cccdlflags='-fPIC'
     lddlflags='-lpthread -shared -Wl,-z,relro -Wl,-z,now 
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib 
-fstack-protector-strong'

Locally applied patches:
     Fedora Patch1: Removes date check, Fedora/RHEL specific
     Fedora Patch2: support for libdir64
     Fedora Patch3: use libresolv instead of libbind
     Fedora Patch4: USE_MM_LD_RUN_PATH
     Fedora Patch5: Provide MM::maybe_command independently (bug #1129443)
     Fedora Patch6: Dont run one io test due to random builder failures
     Fedora Patch8: Define SONAME for libperl.so
     Fedora Patch9: Install libperl.so to -Dshrpdir value
     Fedora Patch10: Document Math::BigInt::CalcEmu requires 
Math::BigInt (CPAN RT#85015)
     Fedora Patch11: Make *DBM_File desctructors thread-safe (RT#61912)
     Fedora Patch12: Replace EU::MakeMaker dependency with EU::MM::Utils 
in IPC::Cmd (bug #1129443)
     Fedora Patch13: Fix executing arybase::_tie_it() in Safe 
compartement (RT#131588)
     Fedora Patch14: Link XS modules to pthread library to fix linking 
with -z defs
     Fedora Patch17: Fix printing a warning about a wide character when 
matching a regular expression while ISO-8859-1 locale is in effect
     Fedora Patch18: Fix invoking a check for wide characters while 
ISO-8859-1 locale is in effect
     Fedora Patch20: Fix build conditions in locale.c
     Fedora Patch21: Fix a file descriptor leak in in-place edits 
(RT#133314)
     Fedora Patch23: Fix a buffer overrun in deprecated S_is_utf8_common()
     Fedora Patch24: Fix a time race in Time-HiRes/t/itimer.t test
     Fedora Patch26: Fix Time::Piece to handle objects in overloaded 
methods correctly
     Fedora Patch27: Fix an assignment to a lexical variable in 
multiconcatenation expressions (RT#133441)
     Fedora Patch28: Fix a spurious warning about uninitialized value in 
warn (RT#132683)
     Fedora Patch30: Pass the correct CFLAGS to dtrace
     Fedora Patch33: Fix PathTools tests to cope with ESTALE error 
(RT#133534)
     Fedora Patch34: Fix an undefined behaviour in S_hv_delete_common()
     Fedora Patch38: Fix compiling regular expressions that contain both 
compile- and run-time compiled code blocks (RT#133687)
     Fedora Patch39: Adjust tests to gdbm-1.15 (RT#133295)
     Fedora Patch44: Fix reporting a line number for non-terminated 
prototypes (RT#133524)
     Fedora Patch45: Fix first eof() return value (RT#133721)
     Fedora Patch49: Prevent long jumps from clobbering local variables 
(RT#133575)
     Fedora Patch50: Fix a mismatch with a case-insesitive regular 
expression on a text with ligatures (RT#133756)
     Fedora Patch53: Fix setting magic when changing $^R (RT#133782)
     Fedora Patch54: Fix a race when loading XS modules
     Fedora Patch56: Fix a leak when compiling a typed hash dereference
     Fedora Patch58: Fix a buffer overread when handling a scope error 
in qr/\(?{/ (RT#133879)
     Fedora Patch59: Fix a buffer overread when parsing a regular 
expression with an unknown character name (RT#133880)
     Fedora Patch60: Fix mbstate_t initialization in POSIX::mblen 
(RT#133928)
     Fedora Patch61: Fix a memory leak when cloning a regular expression
     Fedora Patch62: Fix a memory leak when spawning threads in a BEGIN 
phase
     Fedora Patch63: Fix a memory leak when assigning a regular 
expression to a non-copy-on-write string
     Fedora Patch64: Fix a memory leak when assignig to a localized 
${^WARNING_BITS}
     Fedora Patch65: Fix a memory leak when parsing misindented 
here-documents
     Fedora Patch66: Fix a memory leak in package name lookup (RT#133977)
     Fedora Patch68: Fix a memory leak when deletion in a tied hash dies
     Fedora Patch69: Fix a crash when matching case insensitively 
(RT#133892)
     Fedora Patch70: Fix a memory leak when warning about malformed 
UTF-8 string
     Fedora Patch71: Do not panic when evaluating non-ASCII bare words 
(RT#134061)
     Fedora Patch72: Do not panic when evaluating non-ASCII bare words 
(RT#134061)
     Fedora Patch73: Fix a crash in SIGALARM handler when waiting on a 
child process to be closed (RT#122112)
     Fedora Patch74: Fix a crash in SIGALARM handler when waiting on a 
child process to be closed (RT#122112)
     Fedora Patch75: Fix a crash in SIGALARM handler when waiting on a 
child process to be closed (RT#122112)
     Fedora Patch76: Fix a crash with a negative precision in sprintf 
function (RT#134008)
     Fedora Patch77: Fix a crash with a negative precision in sprintf 
function (RT#134008)
     Fedora Patch78: Prevent from wrapping a width in a numeric format 
string (RT#133913)
     Fedora Patch79: Fix subroutine protypes to track reference aliases 
(RT#134072)
     Fedora Patch80: Improve retrieving a scalar value of a variable 
modified in a signal handler (RT#134035)
     Fedora Patch81: Fix changing packet destination sent from a UDP 
IO::Socket object (RT#133936)
     Fedora Patch82: Fix changing packet destination sent from a UDP 
IO::Socket object (RT#133936)
     Fedora Patch83: Fix changing packet destination sent from a UDP 
IO::Socket object (RT#133936)
     Fedora Patch84: Fix a stack underflow in readline() if passed an 
empty array as an argument (#RT133989)
     Fedora Patch85: Fix %{^CAPTURE_ALL} to be an alias for %- variable 
(RT#131867)
     Fedora Patch86: Fix %{^CAPTURE} value when used after @{^CAPTURE} 
(RT#134193)
     Fedora Patch87: Fix %{^CAPTURE} value when used after @{^CAPTURE} 
(RT#134193)
     Fedora Patch88: Fix a test for a crash in SIGALARM handler when 
waiting on a child process to be closed (RT#122112)
     Fedora Patch89: Fix a crash on an uninitialized warning when 
processing a multideref node (RT#134275)
     Fedora Patch90: Preserve append mode when opening anonymous files 
(RT#134221)
     Fedora Patch91: Preserve append mode when opening anonymous files 
(RT#134221)
     Fedora Patch92: Preserve append mode when opening anonymous files 
(RT#134221)
     Fedora Patch93: Fix propagating non-string variables in an 
exception value (RT#134291)
     Fedora Patch94: Include trailing zero in scalars holding trie data 
(RT#134207)
     Fedora Patch95: Fix a use after free in /(?{...})/ (RT#134208)
     Fedora Patch96: Fix a use after free in debugging output of a collation
     Fedora Patch97: Fix a NULL pointer dereference in PerlIOVia_pushed()
     Fedora Patch98: Fix a crash when setting $@ on unwinding a call 
stack (RT#134266)
     Fedora Patch99: Fix a documentation about a future API change
     Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on 
Linux
     Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux

---
@INC for perl 5.28.2:
     /usr/local/lib64/perl5
     /usr/local/share/perl5
     /usr/lib64/perl5/vendor_perl
     /usr/share/perl5/vendor_perl
     /usr/lib64/perl5
     /usr/share/perl5

---
Environment for perl 5.28.2:
     HOME=/home/henrik
     LANG=en_GB.utf8
     LANGUAGE=
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
PATH=/usr/lib64/qt-3.3/bin:/home/henrik/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin
     PERL_BADLANG (unset)
     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