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

Data::Dumper Doesn't Stringify Numeric Labels #7948

Closed
p5pRT opened this issue Jun 3, 2005 · 5 comments
Closed

Data::Dumper Doesn't Stringify Numeric Labels #7948

p5pRT opened this issue Jun 3, 2005 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 3, 2005

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

Searchable as RT36102$

@p5pRT
Copy link
Author

p5pRT commented Jun 3, 2005

From dmacks@netspace.org

Created by dmacks@netspace.org

The XS implementation of the "extended usage with names" syntax breaks
when given labels that are numeric. Instead it uses the previous label
if there was one. The "pure perl" implementation works correctly.

Test program​:

  use Data​::Dumper;
  sub test {print Data​::Dumper->Dump([qw/a b c d/],[10,11,"AA",12])}
  $Data​::Dumper​::Useperl=0;
  &test;
  print "\n";
  $Data​::Dumper​::Useperl=1;
  &test;

Results​:

  $10 = 'a';
  $10 = 'b';
  $AA = 'c';
  $AA = 'd';
 
  $10 = 'a';
  $11 = 'b';
  $AA = 'c';
  $12 = 'd';

Verified on for the following cases of perl-core-supplied modules​:
  Data​::Dumper 2.12 on Mac OS X, perl 5.8.1 (Apple OS X 10.3.9)
  Data​::Dumper 2.121_02 on Mac OS X, perl 5.8.6 (Fink perl586-core-5.8.6-4)
  Data​::Dumper 2.121 on linux i86, perl 5.8.5 (RedHat perl-5.8.5-4)

Perl Info

Flags:
    category=library
    severity=medium

This perlbug was built using Perl v5.8.5 in the Red Hat build system.
It is being executed now by Perl v5.8.5 - Fri Aug 27 14:46:14 EDT 2004.

Site configuration information for perl v5.8.5:

Configured by Red Hat, Inc. at Fri Aug 27 14:46:14 EDT 2004.

Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
  Platform:
    osname=linux, osvers=2.6.7-1.499smp, archname=x86_64-linux-thread-multi
    uname='linux thor.perf.redhat.com 2.6.7-1.499smp #1 smp wed jul 28 12:34:13 edt 2004 x86_64 x86_64 x86_64 gnulinux '
    config_args='-des -Doptimize=-O2 -g -pipe -m64 -Dversion=5.8.5 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Dprivlib=/usr/lib/perl5/5.8.5 -Dsitelib=/usr/lib/perl5/site_perl/5.8.5 -Dvendorlib=/usr/lib/perl5/vendor_perl/5.8.5 -Darchlib=/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi -Dsitearch=/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi -Dvendorarch=/usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi -Darchname=x86_64-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dinc_version_list=5.8.4 5.8.3 5.8.2 5.8.1 5.8.0'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=define uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2 -g -pipe -m64',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='3.4.1 20040815 (Red Hat 3.4.1-9)', 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='gcc', ldflags =''
    libpth=/usr/local/lib64 /lib64 /usr/lib64
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.3.3.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.3.3'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared'

Locally applied patches:
    


@INC for perl v5.8.5:
    /home/dmacks/lib/perl5/site_perl/5.8.5/x86_64-linux-thread-multi
    /home/dmacks/lib/perl5/site_perl/5.8.5
    /home/dmacks/lib/perl5/site_perl/x86_64-linux-thread-multi
    /home/dmacks/lib/perl5/site_perl/5.8.4
    /home/dmacks/lib/perl5/site_perl/5.8.3
    /home/dmacks/lib/perl5/site_perl/5.8.2
    /home/dmacks/lib/perl5/site_perl/5.8.1
    /home/dmacks/lib/perl5/site_perl/5.8.0
    /home/dmacks/lib/perl5/site_perl
    /home/dmacks/lib64/perl5/5.8.5/x86_64-linux-thread-multi
    /home/dmacks/lib64/perl5/5.8.5
    /home/dmacks/lib64/perl5/x86_64-linux-thread-multi
    /home/dmacks/lib64/perl5/5.8.4
    /home/dmacks/lib64/perl5/5.8.3
    /home/dmacks/lib64/perl5/5.8.2
    /home/dmacks/lib64/perl5/5.8.1
    /home/dmacks/lib64/perl5/5.8.0
    /home/dmacks/lib64/perl5
    /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi
    /usr/lib/perl5/5.8.5
    /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi
    /usr/lib64/perl5/site_perl/5.8.4/x86_64-linux-thread-multi
    /usr/lib64/perl5/site_perl/5.8.3/x86_64-linux-thread-multi
    /usr/lib64/perl5/site_perl/5.8.2/x86_64-linux-thread-multi
    /usr/lib64/perl5/site_perl/5.8.1/x86_64-linux-thread-multi
    /usr/lib64/perl5/site_perl/5.8.0/x86_64-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.5
    /usr/lib/perl5/site_perl/5.8.4
    /usr/lib/perl5/site_perl/5.8.3
    /usr/lib/perl5/site_perl/5.8.2
    /usr/lib/perl5/site_perl/5.8.1
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl
    /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi
    /usr/lib64/perl5/vendor_perl/5.8.4/x86_64-linux-thread-multi
    /usr/lib64/perl5/vendor_perl/5.8.3/x86_64-linux-thread-multi
    /usr/lib64/perl5/vendor_perl/5.8.2/x86_64-linux-thread-multi
    /usr/lib64/perl5/vendor_perl/5.8.1/x86_64-linux-thread-multi
    /usr/lib64/perl5/vendor_perl/5.8.0/x86_64-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.5
    /usr/lib/perl5/vendor_perl/5.8.4
    /usr/lib/perl5/vendor_perl/5.8.3
    /usr/lib/perl5/vendor_perl/5.8.2
    /usr/lib/perl5/vendor_perl/5.8.1
    /usr/lib/perl5/vendor_perl/5.8.0
    /usr/lib/perl5/vendor_perl
    .


Environment for perl v5.8.5:
    HOME=/home/dmacks
    LANG=POSIX
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/dmacks/bin:/usr/kerberos/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin:/usr/bin/games:.
    PERL5LIB=/home/dmacks/lib/perl5/site_perl:/home/dmacks/lib64/perl5
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh

@p5pRT
Copy link
Author

p5pRT commented Jun 21, 2005

From @rgs

Daniel Macks (via RT) wrote​:

The XS implementation of the "extended usage with names" syntax breaks
when given labels that are numeric. Instead it uses the previous label
if there was one. The "pure perl" implementation works correctly.

Test program​:

use Data​::Dumper;
sub test {print Data​::Dumper->Dump([qw/a b c d/],[10,11,"AA",12])}
$Data​::Dumper​::Useperl=0;
&test;

This segfaults with bleadperl.

@p5pRT
Copy link
Author

p5pRT commented Jun 21, 2005

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

@p5pRT
Copy link
Author

p5pRT commented Jun 21, 2005

From @rgs

Rafael Garcia-Suarez wrote​:

Daniel Macks (via RT) wrote​:

The XS implementation of the "extended usage with names" syntax breaks
when given labels that are numeric. Instead it uses the previous label
if there was one. The "pure perl" implementation works correctly.

Test program​:

use Data​::Dumper;
sub test {print Data​::Dumper->Dump([qw/a b c d/],[10,11,"AA",12])}
$Data​::Dumper​::Useperl=0;
&test;

This segfaults with bleadperl.

Not anymore (patch #24917)

@p5pRT p5pRT closed this as completed Jun 21, 2005
@p5pRT
Copy link
Author

p5pRT commented Jun 21, 2005

@rgs - Status changed from 'open' to 'resolved'

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

No branches or pull requests

1 participant