Closed p5pRT closed 6 years ago
use overload '""' => sub { "$_[0]" }; print bless {}\, __PACKAGE__;
The above will lead to a segmentation fault:
0x80a1d87 in Perl_newAV () at av.c:310 310 av = (AV*)NEWSV(3\,0); (gdb) bt #0 0x80a1d87 in Perl_newAV () at av.c:310 Cannot access memory at address 0xbf7ffff8.
Actually\, in different circumstances it breaks at different addresses\, so it looks like a memory corruption problem (or maybe out-of-memory).
The obvious cause for that behaviour is that the stringification function calls stringification itself (resulting in a kind-of-endless loop)\, which is of course a bugin the code.
I still think segfaulting is a bad thing\, since this error is easy to make:
sub as_string { my $self = shift; "$self->{error}\n$self-{info}\n" }
HTH\,
In article \20000407070043\.A22407@​cerebro\.laendle\, Marc Lehmann \pcg@​goof\.com wrote:
I still think segfaulting is a bad thing\, since this error is easy to make:
sub as_string { my $self = shift; "$self->{error}\n$self-{info}\n" }
FWIW\, Larry indicated that he wants -> to interpolate\, thus making this code no longer an error.
Wasn't clear if he meant for Topaz or 5.x.
If 5.x\, any volunteers to start the new development series (5.7.0?) off this way? (I'm afraid it is beyond me.)
On Fri\, Apr 07\, 2000 at 12:02:50PM -0700\, Yitzchak Scott-Thoennes \sthoenna@​efn\.org wrote:
I still think segfaulting is a bad thing\, since this error is easy to make:
sub as_string { my $self = shift; "$self->{error}\n$self-{info}\n" }
FWIW\, Larry indicated that he wants -> to interpolate\, thus making this code no longer an error.
-> already interpolates. You just proved that this error is easy to make: The reason for the bug is the "$self-{info}"\, which interpolates $self\, leading to stringification recursion.
Confirm\, still a problem in 5.8.6/bleadperl.
While writing some quick test I've noticed that the following program segfaults:
package A;
use overload fallback => 1\, '0+' => sub { warn $_[0]; $$_[0] }; sub new { my $x = 5; bless \$x\, __PACKAGE__ }
package main;
my $a = A->new; print $a == 5 ? "OK" : "NOK";
__END__
% perl-5.8.7 -l /tmp/segfault Segmentation fault (core dumped)
(happens with other perls too)
(gdb) bt #0 0x4024c47c in mallopt () from /lib/tls/libc.so.6 #1 0x4024aaf9 in malloc () from /lib/tls/libc.so.6 #2 0x4009269e in Perl_safesysmalloc (size=16) at util.c:73 #3 0x400a4787 in Perl_av_extend (av=0xa013564\, key=1) at av.c:158 #4 0x400a4f96 in Perl_av_store (av=0xa013564\, key=1\, val=0xa013570) at av.c:322 #5 0x4007dc96 in Perl_pad_push (padlist=0x805bad0\, depth=14163\, has_args=1) at pad.c:1537 #6 0x400b2a72 in Perl_pp_entersub () at pp_hot.c:2917 #7 0x40044460 in Perl_amagic_call (left=0x805bb54\, right=0x4015d9f8\, method=4\, flags=9) at gv.c:1787 #8 0x400b8e61 in Perl_sv_2pv_flags (sv=0x805bb54\, lp=0xbf8003fc\, flags=2) at sv.c:3003 #9 0x400f033a in Perl_pp_warn () at pp_sys.c:447 #10 0x40092125 in Perl_runops_debug () at dump.c:1449 #11 0x40044479 in Perl_amagic_call (left=0x805bb54\, right=0x4015d9f8\, method=4\, flags=9) at gv.c:1788 #12 0x400b8e61 in Perl_sv_2pv_flags (sv=0x805bb54\, lp=0xbf80064c\, flags=2) at sv.c:3003 .... #2277 0x400f033a in Perl_pp_warn () at pp_sys.c:447 #2278 0x40092125 in Perl_runops_debug () at dump.c:1449 #2279 0x40044479 in Perl_amagic_call (left=0x805bb54\, right=0x4015d9f8\, method=4\, flags=9) at gv.c:1788 #2280 0x400b8e61 in Perl_sv_2pv_flags (sv=0x805bb54\, lp=0xbf85257c\, flags=2) at sv.c:3003
looks like a recursive loop caused by warn(). not sure if perl can protect against this.
On Fri\, Mar 04\, 2005 at 03:50:33AM -0000\, Stas Bekman wrote:
While writing some quick test I've noticed that the following program segfaults:
package A;
use overload fallback => 1\, '0+' => sub { warn $_[0]; $$_[0] };
Not a comment on the bug (which I can't duplicate on cygwin)\, but surely you mean ${$_[0]} there.
The RT System itself - Status changed from 'new' to 'open'
Yitzchak Scott-Thoennes wrote:
On Fri\, Mar 04\, 2005 at 03:50:33AM -0000\, Stas Bekman wrote:
While writing some quick test I've noticed that the following program segfaults:
package A;
use overload fallback => 1\, '0+' => sub { warn $_[0]; $$_[0] };
Not a comment on the bug (which I can't duplicate on cygwin)\, but surely you mean ${$_[0]} there.
Yes\, thanks Yitzchak\, but as you said\, this is not the cause of the segfault.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Code snippet that throw segfault:
#!/usr/bin/perl use strict; use warnings;
{ package Test; use overload '""' => sub { print @_; }; # dangerous sub new{ return bless {}\, __PACKAGE__; } }
my $o = Test::new();
print $o; # segmentation fault here
\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<
We have a deep recursion\, but general usage don't throw segfaults. For example\, perl -e 'sub f{f()} f()' (disable all swaps to test) produce expected 'Out of memory' message. And we get different process exit status code in that cases.
reisub wrote:
We have a deep recursion\, but general usage don't throw segfaults.
Yeah. That's because deep recursion of ordinary subs happens on the Perl stacks\, whereas recursive overloading happens on the C stack. I think we need a general approach to the C stack getting deep. Old Lisp implementations have things to teach us on this score.
-zefram
The RT System itself - Status changed from 'new' to 'open'
Message RFC822: MIME-Version: 1.0 Subject: Infinite recursion in overload causes SIGSEGV Reply-To: glitchmr@myopera.com Message-ID: 5.17.3_9746_1346089612@strawberry To: perlbug@perl.org From: glitchmr@myopera.com X-RT-Original-Encoding: ascii Content-Type: text/plain; charset="ascii" Content-Length: 3736
This is a bug report for perl from glitchmr@myopera.com, generated with the help of perlbug 1.39 running under perl 5.17.3.
[Please describe your issue here]
Following code causes SIGSEGV. Neither changing package or blessed object doesn't change this bug or make it disappear.
use strict;
use warnings;
use overload '*' => sub {
my ($a, $b) = @_;
$a * $b;
};
# Causes infinite recursion on overload '*' and SIGSEGV.
print 42 * bless [];
Site configuration information for perl 5.17.3:
Configured by glitchmr at Mon Aug 20 11:56:56 CEST 2012.
Summary of my perl5 (revision 5 version 17 subversion 3) configuration: Derived from: ee982b091ce3fe08360cc0fff41cd8c3b39c9787 Platform: osname=linux, osvers=3.2.0-29-generic, archname=x86_64-linux uname='linux strawberry 3.2.0-29-generic #46-ubuntu smp fri jul 27 17:03:23 utc 2012 x86_64 x86_64 x86_64 gnulinux ' config_args='-Dprefix=/home/glitchmr/perl-compile -Dusedevel -DEBUGGING -d' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2 -g', cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.6.3', 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='cc', ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/lib libs=-lnsl -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.15' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector'
Locally applied patches:
@INC for perl 5.17.3: /home/glitchmr/perl5/lib/perl5/x86_64-linux-gnu-thread-multi /home/glitchmr/perl-compile/bin /home/glitchmr/perl5/lib/perl5 /home/glitchmr/perl-compile/lib/site_perl/5.17.3/x86_64-linux /home/glitchmr/perl-compile/lib/site_perl/5.17.3 /home/glitchmr/perl-compile/lib/5.17.3/x86_64-linux /home/glitchmr/perl-compile/lib/5.17.3 .
Environment for perl 5.17.3: HOME=/home/glitchmr LANG=pl_PL.UTF-8 LANGUAGE= LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/glitchmr/perl-compile/bin:/home/glitchmr/parrot/bin:/home/glitchmr/util:/home/glitchmr/perl5/bin:/home/glitchmr/rakudo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/bin:/usr/games:/usr/bin PERL5LIB=/home/glitchmr/perl5/lib/perl5/x86_64-linux-gnu-thread-multi:/home/glitchmr/perl-compile/bin:/home/glitchmr/perl5/lib/perl5 PERL_BADLANG (unset) PERL_LOCAL_LIB_ROOT=/home/glitchmr/perl5 PERL_MB_OPT=--install_base /home/glitchmr/perl5 PERL_MM_OPT=INSTALL_BASE=/home/glitchmr/perl5 SHELL=/usr/bin/fish
Following code causes SIGSEGV. Neither changing package or blessed object doesn't change this bug or make it disappear.
use strict; use warnings; use overload '*' => sub { my ($a\, $b) = @_; $a * $b; }; # Causes infinite recursion on overload '*' and SIGSEGV. print 42 * bless [];
----------------------------------------------------------------- [Please describe your issue here]
Following code causes SIGSEGV. Neither changing package or blessed object doesn't change this bug or make it disappear.
use strict; use warnings; use overload '\*' => sub \{ my \($a\, $b\) = @​\_; $a \* $b; \}; \# Causes infinite recursion on overload '\*' and SIGSEGV\. print 42 \* bless \[\];
I can reproduce this with:
Summary of my perl5 (revision 5 version 16 subversion 1) configuration:
Platform:
osname=linux\, osvers=2.6.38.8-server-10.mga\,
archname=x86_64-linux-thread-multi
uname='linux jonund.mageia.org 2.6.38.8-server-10.mga #1 smp wed jan
25 10:58:50 utc 2012 x86_64 x86_64 x86_64 gnulinux '
config_args='-des -Dinc_version_list=5.16.1
5.16.1/x86_64-linux-thread-multi 5.16.0 5.16.0/x86_64-linux-thread-multi
5.14.2 5.14.1 5.14.0 5.12.3 5.12.2 5.12.1 5.12.0 -Darchname=x86_64-linux
-Dcc=gcc -Doptimize=-O2 -g -pipe -Wformat -Werror=format-security
-Wp\,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4
-fPIC -Wl\,--as-needed -Wl\,-z\,relro -Wl\,-O1 -Wl\,--build-id
-Wl\,--enable-new-dtags -pthread -DDEBUGGING=-g -Dprefix=/usr
-Dvendorprefix=/usr -Dsiteprefix=/usr -Dsitebin=/usr/local/bin
-Dsiteman1dir=/usr/local/share/man/man1
-Dsiteman3dir=/usr/local/share/man/man3 -Dman3dir=/usr/share/man/man3pm
-Dvendorman3dir=/usr/share/man/man3 -Dman3ext=3pm -Dcf_by=Mageia
-Dmyhostname=localhost -Dperladmin=root@localhost
-Dcf_email=root@localhost -Ud_csh -Duseshrplib -Duseithreads -Di_db
-Di_ndbm -Di_gdbm'
hint=recommended\, useposix=true\, d_sigaction=define
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 -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64'\,
optimize='-O2 -g -pipe -Wformat -Werror=format-security
-Wp\,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4
-fPIC -Wl\,--as-needed -Wl\,-z\,relro -Wl\,-O1 -Wl\,--build-id
-Wl\,--enable-new-dtags -pthread'\,
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include'
ccversion=''\, gccversion='4.7.1'\, 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 =' -fstack-protector -L/usr/local/lib64'
libpth=/usr/local/lib64 /lib/../lib64 /usr/lib/../lib64 /lib
/usr/lib /lib64 /usr/lib64
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
-lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.16.so\, so=so\, useshrplib=true\, libperl=libperl.so
gnulibc_version='2.16'
Dynamic Linking:
dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags='-Wl\,-E
-Wl\,-rpath\,/usr/lib/perl5/5.16.1/x86_64-linux-thread-multi/CORE'
cccdlflags='-fPIC'\, lddlflags='-shared -O2 -g -pipe -Wformat
-Werror=format-security -Wp\,-D_FORTIFY_SOURCE=2 -fstack-protector
--param=ssp-buffer-size=4 -fPIC -Wl\,--as-needed -Wl\,-z\,relro -Wl\,-O1
-Wl\,--build-id -Wl\,--enable-new-dtags -pthread -L/usr/local/lib64'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_ALL
USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
USE_REENTRANT_API
Locally applied patches:
Mageia patches
Built under linux
Compiled at Aug 24 2012 07:35:55
%ENV:
PERL5LIB="/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.12.2:/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.14.2:/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.16.0:/home/shlomif/apps/perl/modules/lib/site_perl/5.12.2:/home/shlomif/apps/perl/modules/lib/site_perl/5.14.2:/home/shlomif/apps/perl/modules/lib/site_perl/5.16.0:/home/shlomif/apps/perl/modules/lib/perl5/5.12.2:/home/shlomif/apps/perl/modules/lib/perl5/5.14.2:/home/shlomif/apps/perl/modules/lib/perl5/5.16.0"
PERLBREW_MANPATH=""
PERLBREW_PATH="/home/shlomif/apps/perl/perlbrew/bin"
PERLBREW_PERL=""
PERLBREW_ROOT="/home/shlomif/apps/perl/perlbrew"
PERLBREW_VERSION="0.42"
PERL_AUTOINSTALL="--skipdeps --alldeps"
PERL_MM_USE_DEFAULT="1"
@INC:
/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.12.2
/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.14.2/x86_64-linux-thread-multi
/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.14.2
/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.16.0/x86_64-linux-thread-multi
/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.16.0
/home/shlomif/apps/perl/modules/lib/site_perl/5.12.2
/home/shlomif/apps/perl/modules/lib/site_perl/5.14.2
/home/shlomif/apps/perl/modules/lib/site_perl/5.16.0
/home/shlomif/apps/perl/modules/lib/perl5/5.12.2
/home/shlomif/apps/perl/modules/lib/perl5/5.14.2
/home/shlomif/apps/perl/modules/lib/perl5/5.16.0/x86_64-linux-thread-multi
/home/shlomif/apps/perl/modules/lib/perl5/5.16.0
/usr/lib/perl5/site_perl/5.16.1/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.16.1
/usr/lib/perl5/vendor_perl/5.16.1/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.16.1
/usr/lib/perl5/5.16.1/x86_64-linux-thread-multi
/usr/lib/perl5/5.16.1
/usr/lib/perl5/site_perl/5.16.1
/usr/lib/perl5/site_perl/5.16.1/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.16.0
/usr/lib/perl5/site_perl/5.16.0/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.14.2
/usr/lib/perl5/site_perl/5.14.1
/usr/lib/perl5/site_perl/5.12.3
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.16.1
/usr/lib/perl5/vendor_perl/5.16.1/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.16.0
/usr/lib/perl5/vendor_perl/5.16.0/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.14.2
/usr/lib/perl5/vendor_perl/5.14.1
/usr/lib/perl5/vendor_perl/5.14.0
/usr/lib/perl5/vendor_perl/5.12.3
/usr/lib/perl5/vendor_perl/5.12.2
/usr/lib/perl5/vendor_perl
.
Also with:
Summary of my perl5 (revision 5 version 16 subversion 0) configuration:
Platform:
osname=linux\, osvers=3.5.0-desktop-1.mga3\, archname=x86_64-linux
uname='linux telaviv1.shlomifish.org 3.5.0-desktop-1.mga3 #1 smp sat
jul 28 00:29:28 utc 2012 x86_64 x86_64 x86_64 gnulinux '
config_args='-de
-Dprefix=/home/shlomif/apps/perl/perlbrew/perls/perl-5.16.0
-Aeval:scriptdir=/home/shlomif/apps/perl/perlbrew/perls/perl-5.16.0/bin'
hint=recommended\, useposix=true\, d_sigaction=define
useithreads=undef\, usemultiplicity=undef
useperlio=define\, d_sfio=undef\, uselargefiles=define\, usesocks=undef
use64bitint=define\, use64bitall=define\, uselongdouble=undef
usemymalloc=n\, bincompat5005=undef
Compiler:
cc='cc'\, ccflags ='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'\,
optimize='-O2'\,
cppflags='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include'
ccversion=''\, gccversion='4.7.1'\, 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='cc'\, ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /usr/lib
/lib64 /usr/lib64 /usr/local/lib64
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.16.so\, so=so\, useshrplib=false\, libperl=libperl.a
gnulibc_version='2.16'
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'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_ALL
USE_64_BIT_INT USE_LARGE_FILES USE_LOCALE
USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
Built under linux
Compiled at Aug 1 2012 11:47:54
%ENV:
PERL5LIB="/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.12.2:/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.14.2:/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.16.0:/home/shlomif/apps/perl/modules/lib/site_perl/5.12.2:/home/shlomif/apps/perl/modules/lib/site_perl/5.14.2:/home/shlomif/apps/perl/modules/lib/site_perl/5.16.0:/home/shlomif/apps/perl/modules/lib/perl5/5.12.2:/home/shlomif/apps/perl/modules/lib/perl5/5.14.2:/home/shlomif/apps/perl/modules/lib/perl5/5.16.0"
PERLBREW_MANPATH="/home/shlomif/apps/perl/perlbrew/perls/perl-5.16.0/man"
PERLBREW_PATH="/home/shlomif/apps/perl/perlbrew/bin:/home/shlomif/apps/perl/perlbrew/perls/perl-5.16.0/bin"
PERLBREW_PERL="perl-5.16.0"
PERLBREW_ROOT="/home/shlomif/apps/perl/perlbrew"
PERLBREW_VERSION="0.44"
PERL_AUTOINSTALL="--skipdeps --alldeps"
PERL_MM_USE_DEFAULT="1"
@INC:
/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.12.2
/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.14.2
/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.16.0
/home/shlomif/apps/perl/modules/lib/site_perl/5.12.2
/home/shlomif/apps/perl/modules/lib/site_perl/5.14.2
/home/shlomif/apps/perl/modules/lib/site_perl/5.16.0
/home/shlomif/apps/perl/modules/lib/perl5/5.12.2
/home/shlomif/apps/perl/modules/lib/perl5/5.14.2
/home/shlomif/apps/perl/modules/lib/perl5/5.16.0
/home/shlomif/apps/perl/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/x86_64-linux
/home/shlomif/apps/perl/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0
/home/shlomif/apps/perl/perlbrew/perls/perl-5.16.0/lib/5.16.0/x86_64-linux
/home/shlomif/apps/perl/perlbrew/perls/perl-5.16.0/lib/5.16.0
.
Also with:
Summary of my perl5 (revision 5 version 14 subversion 2) configuration:
Platform:
osname=linux\, osvers=3.2.1-desktop-1.mga2\, archname=x86_64-linux-ld
uname='linux telaviv1.shlomifish.org 3.2.1-desktop-1.mga2 #1 smp sun
jan 15 12:40:59 utc 2012 x86_64 x86_64 x86_64 gnulinux '
config_args='-de
-Dprefix=/home/shlomif/apps/perl/perlbrew/perls/perl-5.14.2-64bitall-longdouble
-Duse64bitall -Duselongdouble'
hint=recommended\, useposix=true\, d_sigaction=define
useithreads=undef\, usemultiplicity=undef
useperlio=define\, d_sfio=undef\, uselargefiles=define\, usesocks=undef
use64bitint=define\, use64bitall=define\, uselongdouble=define
usemymalloc=n\, bincompat5005=undef
Compiler:
cc='cc'\, ccflags ='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'\,
optimize='-O2'\,
cppflags='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include'
ccversion=''\, gccversion='4.6.2'\, 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='long double'\, nvsize=16\,
Off_t='off_t'\, lseeksize=8
alignbytes=16\, prototype=define
Linker and Libraries:
ld='cc'\, ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /usr/lib
/lib64 /usr/lib64 /usr/local/lib64
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.14.1.so\, so=so\, useshrplib=false\, libperl=libperl.a
gnulibc_version='2.14.1'
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'
Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT
USE_LARGE_FILES USE_LONG_DOUBLE USE_PERLIO
USE_PERL_ATOF
Built under linux
Compiled at Jan 19 2012 21:31:49
%ENV:
PERL5LIB="/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.12.2:/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.14.2:/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.16.0:/home/shlomif/apps/perl/modules/lib/site_perl/5.12.2:/home/shlomif/apps/perl/modules/lib/site_perl/5.14.2:/home/shlomif/apps/perl/modules/lib/site_perl/5.16.0:/home/shlomif/apps/perl/modules/lib/perl5/5.12.2:/home/shlomif/apps/perl/modules/lib/perl5/5.14.2:/home/shlomif/apps/perl/modules/lib/perl5/5.16.0"
PERLBREW_MANPATH="/home/shlomif/apps/perl/perlbrew/perls/perl-5.14.2-64bitall-longdouble/man"
PERLBREW_PATH="/home/shlomif/apps/perl/perlbrew/bin:/home/shlomif/apps/perl/perlbrew/perls/perl-5.14.2-64bitall-longdouble/bin"
PERLBREW_PERL="perl-5.14.2-64bitall-longdouble"
PERLBREW_ROOT="/home/shlomif/apps/perl/perlbrew"
PERLBREW_VERSION="0.44"
PERL_AUTOINSTALL="--skipdeps --alldeps"
PERL_MM_USE_DEFAULT="1"
@INC:
/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.12.2
/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.14.2
/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.16.0
/home/shlomif/apps/perl/modules/lib/site_perl/5.12.2
/home/shlomif/apps/perl/modules/lib/site_perl/5.14.2
/home/shlomif/apps/perl/modules/lib/site_perl/5.16.0
/home/shlomif/apps/perl/modules/lib/perl5/5.12.2
/home/shlomif/apps/perl/modules/lib/perl5/5.14.2
/home/shlomif/apps/perl/modules/lib/perl5/5.16.0
/home/shlomif/apps/perl/perlbrew/perls/perl-5.14.2-64bitall-longdouble/lib/site_perl/5.14.2/x86_64-linux-ld
/home/shlomif/apps/perl/perlbrew/perls/perl-5.14.2-64bitall-longdouble/lib/site_perl/5.14.2
/home/shlomif/apps/perl/perlbrew/perls/perl-5.14.2-64bitall-longdouble/lib/5.14.2/x86_64-linux-ld
/home/shlomif/apps/perl/perlbrew/perls/perl-5.14.2-64bitall-longdouble/lib/5.14.2
.
I'm on Mageia Linux 3/Cauldron on x86-64 .
The RT System itself - Status changed from 'new' to 'open'
Looks like the same issue with the following code:
#! /usr/bin/perl
package Obj;
use overload '""' => \&mysub;
sub new { bless{}; }
sub mysub { print "debug: @_"; }
package main;
use Data::Dumper;
my $x = Obj->new;
my $h = { $x }; print Dumper $h;
This is a bug report for perl from cono@claptop.LYV.LiveNation.com\, generated with the help of perlbug 1.39 running under perl 5.18.2.
Following program gives me segfault. #! /usr/bin/perl
package Obj;
use overload '""' => \&mysub;
sub new { bless{}; }
sub mysub { print "debug: @_"; }
package main;
use Data::Dumper;
my $x = Obj->new;
my $h = { $x }; print Dumper $h;
Looks like the same issue with the following code:
#! /usr/bin/perl
package Obj;
use overload '""' => \&mysub;
sub new { bless{}; }
sub mysub { print "debug: @_"; }
package main;
use Data::Dumper;
my $x = Obj->new;
my $h = { $x }; print Dumper $h;
The test case in this ticket is not merely recursing deeply on the C stack\, it's calling for *infinite* recursion. No matter what we do to permit greater recursion\, this test case is bound to fail. Segv is a respectable way for it to fail. This ticket should be closed.
-zefram
@cpansprout - Status changed from 'open' to 'rejected'
Migrated from rt.perl.org#3054 (status was 'rejected')
Searchable as RT3054$