develooper Front page | perl.perl5.porters | Postings from February 2006

[perl #38612] Data::Dumper core dump in 5.8.6, fixed by 5.8.7

From:
jhi @ ugli . hut . fi
Date:
February 22, 2006 01:58
Subject:
[perl #38612] Data::Dumper core dump in 5.8.6, fixed by 5.8.7
Message ID:
rt-3.0.11-38612-130453.5.70240030644186@perl.org
# New Ticket Created by  jhi@ugli.hut.fi 
# Please include the string:  [perl #38612]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=38612 >



This is a bug report for perl from jhi@ugli.hut.fi,
generated with the help of perlbug 1.35 running under perl v5.8.6.


-----------------------------------------------------------------
[Please enter your report here]

The following piece of code used to dump core in 5.8.6:

use Data::Dumper;
sub foo {
     my $s = shift;
     my $c = eval Dumper($s);
     sub bar::quote { }
     bless $c, 'bar';
     my $d = Data::Dumper->new([$c]);
     $d->Freezer('quote');
     return $d->Dump;
}
foo({});

(stack trace appended) but by 5.8.7 whatever the problem was, it had
been avoided/fixed.  I suggest at least adding the above code to the
Data::Dumper tests, and, if Andreas feels so inclined, binary
searching for the change that corrected the problem.

FWIW, the 'quote' sub doing/returning nothing seems to be the trigger
of the core dump.

The core dump stack trace:

Core was generated by `./perl -Ilib /u/vieraat/vieraat/jhi/bus.pl'.
Program terminated with signal 11, Segmentation fault.
...
#0  0x4001a403 in DD_dump (val=0x8175d04, name=0x81d1588 "$VAR1", namelen=5,
    retval=0x81edc64, seenhv=0x818475c, postav=0x81edcac, levelp=0xbffff03c,
    indent=2, pad=0x81846b4, xpad=0x81e0a90, apad=0x81e0a84, sep=0x81e0ac0,
    pair=0x8184684, freezer=0x81e09e8, toaster=0x81e09d0, purity=0,
    deepcopy=0, quotekeys=1, bless=0x81e09f4, maxdepth=0, sortkeys=0x0)
    at Dumper.xs:279
279             ival = SvRV(val);
(gdb) where
#0  0x4001a403 in DD_dump (val=0x8175d04, name=0x81d1588 "$VAR1", namelen=5,
    retval=0x81edc64, seenhv=0x818475c, postav=0x81edcac, levelp=0xbffff03c,
    indent=2, pad=0x81846b4, xpad=0x81e0a90, apad=0x81e0a84, sep=0x81e0ac0,
    pair=0x8184684, freezer=0x81e09e8, toaster=0x81e09d0, purity=0,
    deepcopy=0, quotekeys=1, bless=0x81e09f4, maxdepth=0, sortkeys=0x0)
    at Dumper.xs:279
#1  0x4001e452 in XS_Data__Dumper_Dumpxs (cv=0x81e0b08) at Dumper.xs:1087
#2  0x080d152d in Perl_pp_entersub () at pp_hot.c:2890
#3  0x080b3992 in Perl_runops_debug () at dump.c:1449
#4  0x08062626 in S_run_body (oldscope=1) at perl.c:1934
#5  0x080621b9 in perl_run (my_perl=0x8175c70) at perl.c:1853
#6  0x0805e71e in main (argc=3, argv=0xbffff2d4, env=0xbffff2e4)
    at perlmain.c:98
(gdb) p val
$1 = (SV *) 0x8175d04
(gdb) p *val
$2 = {sv_any = 0x0, sv_refcnt = 1, sv_flags = 2048}
(gdb)


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Site configuration information for perl v5.8.6:

Configured by jhi at Wed Feb 22 08:17:21 EET 2006.

Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
  Platform:
    osname=linux, osvers=2.4.31, archname=i686-linux
    uname='linux ugli.hut.fi 2.4.31 #1 thu jun 2 11:40:52 eest 2005 i686 gnulinux '
    config_args='-des -Doptimize=-g'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-g',
    cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='3.3.5 (Debian 1:3.3.5-13)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.3.2'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.8.6:
    lib
    /usr/local/lib/perl5/5.8.6/i686-linux
    /usr/local/lib/perl5/5.8.6
    /usr/local/lib/perl5/site_perl/5.8.6/i686-linux
    /usr/local/lib/perl5/site_perl/5.8.6
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.8.6:
    HOME=/u/vieraat/vieraat/jhi
    LANG=C
    LANGUAGE (unset)
    LC_ALL=fi_FI.ISO8859-1
    LC_CTYPE=fi_FI.ISO8859-1
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/u/vieraat/vieraat/jhi/.bin:/u/vieraat/vieraat/jhi/.s:/c/bin:/p/bin:/p/adm/bin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib:/etc:/lib:/usr/bin/X11:/u/vieraat/vieraat/jhi
    PERL_BADLANG (unset)
    SHELL=/bin/zsh




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