
perlbug-followup at perl
Oct 15, 2010, 7:54 AM
Post #1 of 3
(276 views)
Permalink
|
|
[perl #78398] eval STRING compilation failure breaks overloading
|
|
# New Ticket Created by hdp [at] glaive # Please include the string: [perl #78398] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=78398 > This is a bug report for perl from hdp [at] glaive, generated with the help of perlbug 1.39 running under perl 5.10.1. ----------------------------------------------------------------- [Please describe your issue here] Using eval STRING inside an overload method causes stack corruption when STRING has compile-time errors. Commenting out the eval makes it work; or changing it to just eval "require Foo::Bar" putting it inside { local $@; eval ... } makes it abort: perl: pp_ctl.c:2073: Perl_pp_leaveloop: Assertion `(((cx)->cx_u.cx_subst.sbu_type & 0xC) == 0x4)' fail. perl 5.10.1 and 5.8.9 segfault here instead of aborting. Any compile-time error works, like "BEGIN { !@#!@# }" or "use Foo::Bar" use overload (q{""} => 'str'); sub new { bless {} } sub str { eval "BEGIN { require Foo::Bar }"; return 1; } main->new() . ""; [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=high --- Site configuration information for perl 5.10.1: Configured by hdp at Sun Apr 11 07:47:29 EDT 2010. Summary of my perl5 (revision 5 version 10 subversion 1) configuration: Platform: osname=linux, osvers=2.6.31.5-linode21, archname=i686-linux uname='linux glaive 2.6.31.5-linode21 #1 smp mon oct 26 18:17:01 utc 2009 i686 gnulinux ' config_args='-de -Dprefix=/home/hdp/perl5/perlbrew/perls/perl-5.10.1' hint=recommended, useposix=true, d_sigaction=define 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 ='-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.3.3', 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 =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /usr/lib64 libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.9.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.9' 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' Locally applied patches: --- @INC for perl 5.10.1: /home/hdp/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/i686-linux /home/hdp/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1 /home/hdp/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/i686-linux /home/hdp/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1 . --- Environment for perl 5.10.1: HOME=/home/hdp LANG=en_US.UTF8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/hdp/perl5/perlbrew/bin:/home/hdp/perl5/perlbrew/perls/current/bin:/home/hdp/bin:/home/hdp/local/bin:/home/hdp/local/sbin:/var/lib/gems/1.8/bin:/home/hdp/.inker/perl/bin:/home/hdp/bin:/home/hdp/local/bin:/home/hdp/local/sbin:/var/lib/gems/1.8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games PERL_BADLANG (unset) PERL_CPANM_OPT=--prompt --skip-installed --mirror http://cpan.cpantesters.org SHELL=/usr/bin/zsh
|