develooper Front page | perl.perl5.porters | Postings from August 2018

[perl #133326] Storable's recursion check fires even inunproblematic cases

Thread Previous
From:
slaven@rezic.de via RT
Date:
August 3, 2018 15:06
Subject:
[perl #133326] Storable's recursion check fires even inunproblematic cases
Message ID:
rt-4.0.24-26521-1533308796-615.133326-15-0@perl.org
Dana Tue, 03 Jul 2018 01:40:45 -0700, slaven@rezic.de reče:
> 
> This is a bug report for perl from slaven@rezic.de,
> generated with the help of perlbug 1.41 running under perl 5.28.0.
> 
> 
> -----------------------------------------------------------------
> The recursion check introduced in Storable 3.x croaks in cases
> where there is no problematic recursion involved. A sample oneliner:
> 
> $ perl5.28.0 -E 'use Storable qw(dclone); say
> "version=",$Storable::VERSION; say
> "limit=",$Storable::recursion_limit; my @tt; for (1..16000) { my $t =
> [[[]]]; push @tt, $t } dclone \@tt'
> version=3.08
> limit=15692
> Max. recursion depth with nested structures exceeded at -e line 1.
> 
> (Depending on the calculated recursion_limit the number of iterations
> has to be adjusted)
> 
> This is not a problem with earlier Storable versions, even with much
> more
> elements in this array:
> 
> $ perl5.26.2 -E 'use Storable qw(dclone); say
> "version=",$Storable::VERSION; say
> "limit=",$Storable::recursion_limit; my @tt; for (1..1_000_000) { my
> $t = [[[]]]; push @tt, $t } dclone \@tt'
> version=2.62
> limit=
> (no output)
> 
> If $Storable::DEBUGME is set (and a debugging perl is available),
> then one can see that recur_depth is constantly increasing.
> 
> 
> BTW: Storable's bug queue currently points to rt.perl.org. But
> https://rt.cpan.org/Public/Dist/Display.html?Name=Storable still
> exists and has a lot of open issues, and I find it much easier
> to find Storable-related issues in a specific bug queue than in
> the huge and rather unstructured perl bug queue. For example,
> even if we have the flag "module=..." created by perlbug
> it is nowhere reflected in rt.perl.org (e.g. it's not possible
> to search for this field, it seems).
> 
> -----------------------------------------------------------------
> ---
> Flags:
>     category=library
>     severity=high
>     module=Storable
> ---
> Site configuration information for perl 5.28.0:
> 
> Configured by eserte at Sat Jun 23 08:28:02 CEST 2018.
> 
> Summary of my perl5 (revision 5 version 28 subversion 0)
> configuration:
> 
> Platform:
>   osname=linux
>   osvers=3.16.0-4-amd64
>   archname=x86_64-linux
>   uname='linux cabulja 3.16.0-4-amd64 #1 smp debian 3.16.51-3 (2017-
> 12-13) x86_64 gnulinux '
>   config_args='-ds -e -Dprefix=/opt/perl-5.28.0
> -Dcf_email=srezic@cpan.org'
>   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 -fno-strict-aliasing -pipe -fstack-protector-
> strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -D_FORTIFY_SOURCE=2'
>   optimize='-O2'
>   cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-
> strong -I/usr/local/include'
>   ccversion=''
>   gccversion='4.9.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='cc'
>   ldflags =' -fstack-protector-strong -L/usr/local/lib'
>   libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.9/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
>   libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
> -lgdbm_compat
>   perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
>   libc=libc-2.19.so
>   so=so
>   useshrplib=false
>   libperl=libperl.a
>   gnulibc_version='2.19'
> Dynamic Linking:
>   dlsrc=dl_dlopen.xs
>   dlext=so
>   d_dlsymun=undef
>   ccdlflags='-Wl,-E'
>   cccdlflags='-fPIC'
>   lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'
> 
> 
> ---
> @INC for perl 5.28.0:
>     /opt/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux
>     /opt/perl-5.28.0/lib/site_perl/5.28.0
>     /opt/perl-5.28.0/lib/5.28.0/x86_64-linux
>     /opt/perl-5.28.0/lib/5.28.0
> 
> ---
> Environment for perl 5.28.0:
>     HOME=/home/eserte
>     LANG=en_US.UTF-8
>     LANGUAGE=en_US:en
>     LD_LIBRARY_PATH (unset)
>     LOGDIR (unset)
>     PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/eserte/bin/linux-
> gnu:/home/eserte/bin/sh:/home/eserte/bin:/home/eserte/bin/pistachio-
> perl/bin:/usr/games:/home/eserte/devel
>     PERLDOC=-MPod::Perldoc::ToTextOverstrike
>     PERL_BADLANG (unset)
>     SHELL=/bin/zsh

Ping.


---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=133326

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