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

overload recursion not trapped #1795

Closed
p5pRT opened this issue Apr 6, 2000 · 20 comments
Closed

overload recursion not trapped #1795

p5pRT opened this issue Apr 6, 2000 · 20 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 6, 2000

Migrated from rt.perl.org#3054 (status was 'rejected')

Searchable as RT3054$

@p5pRT
Copy link
Author

p5pRT commented Apr 6, 2000

From pcg@goof.com

Created by root@cerebro.laendle

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,

Perl Info

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


@p5pRT
Copy link
Author

p5pRT commented Apr 7, 2000

From @ysth

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.)

@p5pRT
Copy link
Author

p5pRT commented Apr 12, 2000

From [Unknown Contact. See original ticket]

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.

@p5pRT
Copy link
Author

p5pRT commented Dec 13, 2004

From @schwern

Confirm, still a problem in 5.8.6/bleadperl.

@p5pRT
Copy link
Author

p5pRT commented Mar 4, 2005

From stas@stason.org

Created by stas@rabbit.stason.org

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.

Perl Info

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

-- 
__________________________________________________________________
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

@p5pRT
Copy link
Author

p5pRT commented Mar 4, 2005

From @ysth

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.

@p5pRT
Copy link
Author

p5pRT commented Mar 4, 2005

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

@p5pRT
Copy link
Author

p5pRT commented Mar 4, 2005

From stas@stason.org

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

@p5pRT
Copy link
Author

p5pRT commented Feb 12, 2012

From reisub@ya.ru

Created by reisub@ya.ru

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.

Perl Info

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

@p5pRT
Copy link
Author

p5pRT commented Feb 13, 2012

From zefram@fysh.org

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

@p5pRT
Copy link
Author

p5pRT commented Feb 13, 2012

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

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2012

From glitchmr@myopera.com

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 [];

[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: ee982b0
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

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2012

From glitchmr@myopera.com

Created by glitchmr@myopera.com

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 [];

Perl Info

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

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2012

From @shlomif

-----------------------------------------------------------------
[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\) = @&#8203;\_;
    $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 .

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2012

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

@p5pRT
Copy link
Author

p5pRT commented Aug 13, 2014

From q@cono.org.ua

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;

@p5pRT
Copy link
Author

p5pRT commented Aug 13, 2014

From q@cono.org.ua

Created by cono@claptop.LYV.LiveNation.com

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;

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.18.2:

Configured by Gentoo at Tue Jul 29 19:37:38 EEST 2014.

Summary of my perl5 (revision 5 version 18 subversion 2) configuration:
   
  Platform:
    osname=linux, osvers=3.12.21-gentoo-r1, archname=x86_64-linux-thread-multi
    uname='linux claptop 3.12.21-gentoo-r1 #4 smp tue jul 22 17:27:41 eest 2014 x86_64 intel(r) core(tm) i7-2620m cpu @ 2.70ghz genuineintel gnulinux '
    config_args='-des -Duseshrplib -Darchname=x86_64-linux-thread -Dcc=x86_64-pc-linux-gnu-gcc -Doptimize=-march=native -O2 -pipe -fomit-frame-pointer -Dldflags=-Wl,-O1 -Wl,--as-needed -Dprefix=/usr -Dinstallprefix=/usr -Dsiteprefix=/usr/local -Dvendorprefix=/usr -Dscriptdir=/usr/bin -Dprivlib=/usr/lib64/perl5/5.18.2 -Darchlib=/usr/lib64/perl5/5.18.2/x86_64-linux-thread-multi -Dsitelib=/usr/local/lib64/perl5/5.18.2 -Dsitearch=/usr/local/lib64/perl5/5.18.2/x86_64-linux-thread-multi -Dvendorlib=/usr/lib64/perl5/vendor_perl/5.18.2 -Dvendorarch=/usr/lib64/perl5/vendor_perl/5.18.2/x86_64-linux-thread-multi -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dvendorman1dir=/usr/share/man/man1 -Dvendorman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3pm -Dlibperl=libperl.so.5.18.2 -Dlocincpth=/usr/include  -Dglibpth=/lib64 /usr/lib64  -Duselargefiles -Dd_semctl_semun -Dcf_by=Gentoo -Dmyhostname=localhost -Dperladmin=root@localhost -Dinstallusrbinperl=n -Ud_csh -Uusenm -Di_ndbm -Di_gdbm -Di_db -Dusethreads -DDEBUGGING=none -Dinc_version_list=5.18.0/x86_64-linux-thread-multi 5.18.0 5.18.1/x86_64-linux-thread-multi 5.18.1  -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Dnoextensions=ODBM_File'
    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='x86_64-pc-linux-gnu-gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-march=native -O2 -pipe -fomit-frame-pointer',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe'
    ccversion='', gccversion='4.7.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='x86_64-pc-linux-gnu-gcc', ldflags ='-Wl,-O1 -Wl,--as-needed'
    libpth=/usr/local/lib64 /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.19.so, so=so, useshrplib=true, libperl=libperl.so.5.18.2
    gnulibc_version='2.19'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -march=native -O2 -pipe -fomit-frame-pointer -Wl,-O1 -Wl,--as-needed'

Locally applied patches:
    gentoo/EUMM-RUNPATH - https://bugs.gentoo.org/105054 cpan/ExtUtils-MakeMaker: drop $PORTAGE_TMPDIR from LD_RUN_PATH
    gentoo/EUMM_delete_packlist - Don't install .packlist or perllocal.pod for perl or vendor
    gentoo/config_over - Remove -rpath and append LDFLAGS to lddlflags
    gentoo/cpan_definstalldirs - Provide a sensible INSTALLDIRS default for modules installed from CPAN.
    gentoo/cpanplus_definstalldirs - Configure CPANPLUS to use the site directories by default.
    gentoo/create_libperl_soname - https://bugs.gentoo.org/286840 Set libperl soname
    gentoo/drop_fstack_protector - https://bugs.gentoo.org/348557 Don't force -fstack-protector on everyone.
    gentoo/enc2xs - Tweak enc2xs to follow symlinks and ignore missing @INC directories.
    gentoo/mod_paths - Add /etc/perl to @INC
    gentoo/patchlevel - List packaged patches for perl-5.18.2-r1(#2) in patchlevel.h
    gentoo/aix_soname - aix gcc detection and shared library soname support
    gentoo/opensolars_headers - Add headers for opensolaris
    gentoo/cleanup-paths - Cleanup PATH and shrpenv
    gentoo/usr_local - Remove /usr/local paths
    gentoo/hints_hpux - Fix hpux hints
    gentoo/darwin-cc-ld - https://bugs.gentoo.org/297751 darwin: Use $CC to link
    gentoo/interix - Fix interix hints
    fixes/net_smtp_docs - [rt.cpan.org #36038] Document the Net::SMTP 'Port' option
    debian/cpan-missing-site-dirs - Fix CPAN::FirstTime defaults with nonexisting site dirs if a parent is writable
    fixes/memoize_storable_nstore - [rt.cpan.org #77790] Memoize::Storable: respect 'nstore' option not respected
    fixes/net_ftp_failed_command - [rt.cpan.org #37700] Net::FTP: cope gracefully with a failed command
    fixes/perlbug-patchlist - [3541c11] [perl #118433] Make perlbug look up the list of local patches at run time
    fixes/module_metadata_taint_fix - [bff978f] [rt.cpan.org #88576] untaint version, if needed, in Module::Metadata
    fixes/IPC-SysV-spelling - [rt.cpan.org #86736] Fix spelling of IPC_CREAT in IPC-SysV documentation
    fixes/freemint -


@INC for perl 5.18.2:
    /etc/perl
    /usr/local/lib64/perl5/5.18.2/x86_64-linux-thread-multi
    /usr/local/lib64/perl5/5.18.2
    /usr/lib64/perl5/vendor_perl/5.18.2/x86_64-linux-thread-multi
    /usr/lib64/perl5/vendor_perl/5.18.2
    /usr/local/lib64/perl5
    /usr/lib64/perl5/vendor_perl
    /usr/lib64/perl5/5.18.2/x86_64-linux-thread-multi
    /usr/lib64/perl5/5.18.2
    .


Environment for perl 5.18.2:
    HOME=/home/cono
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LC_ALL=en_US.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/x11r6/bin:/usr/games/bin:/home/cono/bin:/home/cono/work/rakudo/install/bin:/home/cono/work/android/tools:/home/cono/work/android/platform-tools
    PERL_BADLANG (unset)
    SHELL=/bin/zsh

@p5pRT
Copy link
Author

p5pRT commented Aug 13, 2014

From [Unknown Contact. See original ticket]

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;

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2017

From zefram@fysh.org

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

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2017

@cpansprout - Status changed from 'open' to 'rejected'

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