[perl #58614] foreach @foo ( @bar ) causes segfault with namespace::clean
by Nothingmuch@Syeeda.Local other posts by this author
Sep 6 2008 4:10AM messages near this date
Re: maint-5.8@34289 on VMS
|
Re: [perl #58614] foreach @foo ( @bar ) causes segfault with namespace::clean
# New Ticket Created by nothingmuch@[...].local
# Please include the string: [perl #58614]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58614 >
This is a bug report for perl from nothingmuch@[...].local,
generated with the help of perlbug 1.35 running under perl v5.10.0.
-----------------------------------------------------------------
The following script produces a segfault or bus error for me:
package Foo;
use Moose;
use namespace::clean -except => 'meta';
sub bar {
my ( $self, @args ) = @_;
my @ret; # without this it's a segfault, with it it's a bus error (null pointer deref on
osx)
foreach my @error ( @args ) {
}
}
Moose uses Sub::Exporter to create export closures for its declaration syntax.
These are then deleted by namespace::clean when the Scope::Guard it puts in %^H
is stringified and thus goes out of scope.
I suspect that the parse failure is causing %^H to be cleaned up differently,
and that the garbage collection is causing these issues.
I can't reduce the test case any more than this.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
This perlbug was built using Perl v5.8.8 - Fri May 2 00:15:29 CST 2008
It is being executed now by Perl v5.10.0 - Tue Jan 29 05:46:20 IST 2008.
Site configuration information for perl v5.10.0:
Configured by nothingmuch at Tue Jan 29 05:46:20 IST 2008.
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=darwin, osvers=9.1.0, archname=darwin-multi-2level
uname='darwin syeeda.local 9.1.0 darwin kernel version 9.1.0: wed oct 31 17:46:22 pdt 20
07; root:xnu-1228.0.2~1release_i386 i386 '
config_args='-Uusethreads -Dusemultiplicity -de -s'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, 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 ='-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe
-I/usr/local/include',
optimize='-O3',
cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing
-pipe -I/usr/local/include'
ccversion='', gccversion='4.0.1 (Apple Inc. build 5465)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib
libs=-ldbm -ldl -lm -lutil -lc
perllibs=-ldl -lm -lutil -lc
libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.10.0:
/usr/local/svk-1.06/perl/darwin-thread-multi-2level/
/usr/local/lib/perl5/5.10.0/darwin-multi-2level
/usr/local/lib/perl5/5.10.0
/usr/local/lib/perl5/site_perl/5.10.0/darwin-multi-2level
/usr/local/lib/perl5/site_perl/5.10.0
/usr/local/lib/perl5/site_perl/5.8.8
/usr/local/lib/perl5/site_perl/5.8.6
/usr/local/lib/perl5/site_perl
.
---
Environment for perl v5.10.0:
DYLD_LIBRARY_PATH (unset)
HOME=/Users/nothingmuch
LANG=en_US.UTF-8
LANGUAGE (unset)
LC_ALL=en_US.UTF-8
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/Users/nothingmuch/bin:/Users/nothingmuch/bin:/bin:/sbin:/usr/local/bin:/usr/local/
sbin:/usr/bin:/usr/sbin:/Applications/Graphviz.app/Contents/MacOS:/Applications/Doxygen.app/
Contents/Resources:/Applications/MPlayer OSX.app/Contents/Resources/External_Binaries/mplaye
r_intel.app/Contents/MacOS:/opt/local/bin:/opt/local/sbin:/usr/local/perls/blead/bin:/usr/lo
cal/perls/5.6.2/bin:/Applications/Graphviz.app/Contents/MacOS:/Developer/Tools
PERL5LIB=/usr/local/svk-1.06/perl/darwin-thread-multi-2level/
PERL_AUTOINSTALL=--checkonly
PERL_BADLANG (unset)
PERL_MM_USE_DEFAULT=1
SHELL=/bin/bash
Thread:
Nothingmuch@Syeeda.Local
Dave Mitchell
|