Skip Menu |
Report information
Id: 3054
Status: rejected
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: glitchmr [at] myopera.com
pcg [at] goof.com
reisub <reisub [at] ya.ru>
stas <stas [at] stason.org>
Cc:
AdminCc:

Operating System: All
PatchStatus: (no value)
Severity: medium
Type:
Perl Version:
  • 5.6.0
  • 5.8.0
  • 5.6.1
  • 5.6.2
  • 5.7.0
  • 5.7.1
  • 5.7.2
  • 5.8.1
  • 5.8.2
  • 5.8.3
  • 5.8.4
  • 5.8.5
  • 5.9.0
  • 5.9.1
  • 5.9.2
  • 5.11.0
Fixed In: (no value)



Date: Fri, 7 Apr 2000 07:00:43 +0200
From: Marc Lehmann <pcg [...] goof.com>
To: perlbug [...] perl.com
Subject: overload recursion not trapped
Download (untitled) / with headers
text/plain 3.2k
This is a bug report for perl from root@cerebro.laendle, generated with the help of perlbug 1.28 running under perl v5.6.0. ----------------------------------------------------------------- [Please enter your report here] 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, [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=medium --- Site configuration information for perl v5.6.0: Configured by root at Fri Mar 24 17:33:21 CET 2000. Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=linux, osvers=2.2, archname=i686-linux uname='linux cerebro 2.2.14 #59 smp fri mar 10 22:52:46 cet 2000 i686 unknown ' config_args='' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=undef use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef Compiler: cc='gcc', optimize='-Os -mpentiumpro -g', gccversion=gcc-2.95.2 19991024 (release) cppflags='-fno-strict-aliasing -I/usr/local/include' ccflags ='-fno-strict-aliasing -I/usr/local/include' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4 alignbytes=4, usemymalloc=y, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-ldl -lm -lc -lcrypt libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Locally applied patches: --- @INC for perl v5.6.0: /usr/app/lib/perl5 /usr/app/lib/perl5 /usr/app/lib/perl5 /usr/app/lib/perl5 . --- Environment for perl v5.6.0: HOME=/root LANG (unset) LANGUAGE (unset) LC_CTYPE=de LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/root/ms::/usr/app/FM556_linux/bin:/root/cc/dejagnu/bin:/usr/app/qt/bin/:.:/root/s:/bin:/sbin:/usr/bin:/usr/sbin:/usr/app/bin:/usr/app/sbin:/usr/X11/bin:/usr/games:/usr/maple/bin:/usr/kde/bin:/usr/gnome/bin:/home/pg/bin:/opt/bin:/localvol/usr/app/insure++/bin.linux PERLDB_OPTS=ornaments=0 PERL_BADLANG (unset) SHELL=/bin/bash
From: sthoenna [...] efn.org (Yitzchak Scott-Thoennes)
To: perl5-porters [...] perl.org
Subject: Re: [ID 20000406.012] overload recursion not trapped
Date: Fri, 07 Apr 2000 12:02:50 -0700
Download (untitled) / with headers
text/plain 498b
In article <20000407070043.A22407@cerebro.laendle>, Marc Lehmann <pcg@goof.com> wrote: Show quoted text
> 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.)
Date: Wed, 12 Apr 2000 11:20:34 +0200
From: Marc Lehmann <pcg [...] goof.com>
To: Yitzchak Scott-Thoennes <sthoenna [...] efn.org>
Cc: perl5-porters [...] perl.org
Subject: Re: [ID 20000406.012] overload recursion not trapped
Download (untitled) / with headers
text/plain 545b
On Fri, Apr 07, 2000 at 12:02:50PM -0700, Yitzchak Scott-Thoennes <sthoenna@efn.org> wrote: Show quoted text
> > 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.
Subject: segfault with overload doing recursive looping
Date: Thu, 03 Mar 2005 22:50:09 -0500
To: perlbug [...] perl.org
From: Stas Bekman <stas [...] stason.org>
Download (untitled) / with headers
text/plain 5.3k
This is a bug report for perl from stas@rabbit.stason.org, generated with the help of perlbug 1.35 running under perl v5.8.6. ----------------------------------------------------------------- [Please enter your report here] 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. [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=library severity=low --- Site configuration information for perl v5.8.6: Configured by stas at Thu Mar 3 21:36:23 EST 2005. Summary of my perl5 (revision 5 version 8 subversion 6) configuration: Platform: osname=linux, osvers=2.6.8.1-12mdk, archname=i686-linux uname='linux rabbit.stason.org 2.6.8.1-12mdk #1 fri oct 1 12:53:41 cest 2004 i686 mobile intel(r) pentium(r) 4 - m cpu 2.00ghz unknown gnulinux ' config_args='-des -Dprefix=/home/stas/perl/5.8.7 -Doptimize=-g -Duseshrplib -Dusedevel' 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 -I/usr/include/gdbm', optimize='-g', cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)', 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 -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -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,/home/stas/perl/5.8.7/lib/5.8.6/i686-linux/CORE' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Locally applied patches: MAINT23940 --- @INC for perl v5.8.6: /home/stas/perl/5.8.7/lib/5.8.6/i686-linux /home/stas/perl/5.8.7/lib/5.8.6 /home/stas/perl/5.8.7/lib/site_perl/5.8.6/i686-linux /home/stas/perl/5.8.7/lib/site_perl/5.8.6 /home/stas/perl/5.8.7/lib/site_perl . --- Environment for perl v5.8.6: HOME=/home/stas LANG=en_GB LANGUAGE=en_GB:en LC_ADDRESS=en_CA LC_COLLATE=en_GB LC_CTYPE=en_GB LC_IDENTIFICATION=en_CA LC_MEASUREMENT=en_CA LC_MESSAGES=en_GB LC_MONETARY=en_CA LC_NAME=en_CA LC_NUMERIC=en_CA LC_PAPER=en_CA LC_SOURCED=1 LC_TELEPHONE=en_CA LC_TIME=en_GB LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr//bin:/bin:/usr/bin:.:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/home/stas/bin:/home/stas/bin:/usr/local/bin:/usr/X11R6/bin:/usr/java/j2re1.4.0/bin/ PERLDOC_PAGER=less -R PERL_BADLANG (unset) SHELL=/bin/tcsh -- Show quoted text
__________________________________________________________________ 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
Subject: Re: [perl #34333] segfault with overload doing recursive looping
Date: Thu, 3 Mar 2005 23:05:27 -0800
To: perl5-porters [...] perl.org
From: Yitzchak Scott-Thoennes <sthoenna [...] efn.org>
Download (untitled) / with headers
text/plain 351b
On Fri, Mar 04, 2005 at 03:50:33AM -0000, Stas Bekman wrote: Show quoted text
> 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.
CC: perl5-porters [...] perl.org
Subject: Re: [perl #34333] segfault with overload doing recursive looping
Date: Fri, 04 Mar 2005 11:36:22 -0500
To: Yitzchak Scott-Thoennes <sthoenna [...] efn.org>
From: Stas Bekman <stas [...] stason.org>
Download (untitled) / with headers
text/plain 813b
Yitzchak Scott-Thoennes wrote: Show quoted text
> 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. -- Show quoted text
__________________________________________________________________ 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
Subject: stringify overloading call segfaults
Date: Sun, 12 Feb 2012 17:30:42 +0400
To: perlbug [...] perl.org
From: reisub <reisub [...] ya.ru>
Download (untitled) / with headers
text/plain 4.3k
This is a bug report for perl from reisub@ya.ru, generated with the help of perlbug 1.39 running under perl 5.14.2. ----------------------------------------------------------------- [Please describe your issue here] Code snippet that throw segfault: Show quoted text
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#!/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. [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=low --- Site configuration information for perl 5.14.2: Configured by nobody at Wed Jan 18 16:57:47 UTC 2012. Summary of my perl5 (revision 5 version 14 subversion 2) configuration: Platform: osname=linux, osvers=3.2.1-1-arch, archname=i686-linux-thread-multi uname='linux marin 3.2.1-1-arch #1 smp preempt fri jan 13 06:50:31 cet 2012 i686 intel(r) core(tm) i7 cpu 920 @ 2.67ghz genuineintel gnulinux ' config_args='-des -Dusethreads -Duseshrplib -Doptimize=-march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Dprefix=/usr -Dinstallprefix=/usr -Dvendorprefix=/usr -Dprivlib=/usr/share/perl5/core_perl -Darchlib=/usr/lib/perl5/core_perl -Dsitelib=/usr/share/perl5/site_perl -Dsitearch=/usr/lib/perl5/site_perl -Dvendorlib=/usr/share/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl -Dscriptdir=/usr/bin/core_perl -Dsitescript=/usr/bin/site_perl -Dvendorscript=/usr/bin/vendor_perl -Dinc_version_list=none -Dman1ext=1perl -Dman3ext=3perl -Dlddlflags=-shared -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -Dldflags=-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', 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='-march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.6.2 20111223 (prerelease)', 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 ='-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.15.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.15' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE' cccdlflags='-fPIC', lddlflags='-shared -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/local/lib -fstack-protector' Locally applied patches: --- @INC for perl 5.14.2: /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl . --- Environment for perl 5.14.2: HOME=/home/nv LANG=en_US.UTF-8 LANGUAGE=en_US.utf8 LC_MESSAGES=en_US.utf8 LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/nv/.local/bin PERL_BADLANG (unset) SHELL=/bin/bash
Subject: Re: [perl #110488] stringify overloading call segfaults
Date: Mon, 13 Feb 2012 10:59:22 +0000
To: perl5-porters [...] perl.org
From: Zefram <zefram [...] fysh.org>
Download (untitled) / with headers
text/plain 358b
reisub wrote: Show quoted text
>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
Subject: Infinite recursion in overload causes SIGSEGV
Date: Mon, 27 Aug 2012 19:53:55 +0200
To: perlbug [...] perl.org
From: GlitchMr <glitchmr [...] myopera.com>
Subject: Infinite recursion in overload causes SIGSEGV
To: perlbug [...] perl.org
From: glitchmr [...] myopera.com
Download (untitled) / with headers
text/plain 3.6k
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 []; [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=low --- 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
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 14.5k
Show quoted text
> ----------------------------------------------------------------- > [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 .
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 265b
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;
Subject: perlbug.rep
Download perlbug.rep
application/octet-stream 6.4k

Message body not shown because it is not plain text.

From: Zefram <zefram [...] fysh.org>
Subject: Re: [perl #3054] overload recursion not trapped
Date: Sun, 10 Dec 2017 22:36:01 +0000
To: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 282b
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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org