Skip Menu |
Report information
Id: 74542
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: occitan [at] esperanto.org
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: (no value)
Severity: High
Type:
  • core
  • CoreDump
  • OS-interaction
Perl Version: (no value)
Fixed In: (no value)



Subject: 5.12.0 crash on diverse platforms
Date: Wed, 21 Apr 2010 02:02:57 +0200
To: perlbug [...] perl.org
From: Daniel Pfeiffer <occitan [...] t-online.de>
Download (untitled) / with headers
text/plain 882b
One of the utilities of makepp SEGVs in the regression test on each of Linux x86 and Win (both ActiveState) and Solaris 10 Sparc self compiled as 32bit. This last worked with CPAN testers on i86pc-solaris-V5.11.5. I have narrowed it down to the following little test: #!/usr/bin/perl -w sub f { lstat '/'; -d _; } $_ = split /x/, f; The context split (with any regexp) is needed, though it crashes in -d _. #0 0x0810f3fb in Perl_pp_ftrowned () #1 0x080cb352 in Perl_runops_standard () #2 0x08074af2 in S_run_body () #3 0x0807498a in perl_run () #4 0x08060ded in main () Besides a fix for future versions, I am desperate for a workaround ;-) coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn Daniel Pfeiffer -- lerne / learn / apprends / lär dig / ucz się Esperanto: http://lernu.net / http://ikurso.net
CC: bugs-bitbucket [...] rt.perl.org
Subject: Re: [perl #74542] 5.12.0 crash on diverse platforms
Date: Wed, 21 Apr 2010 15:08:58 +0200
To: perl5-porters [...] perl.org
From: Rafael Garcia-Suarez <rgs [...] consttype.org>
Download (untitled) / with headers
text/plain 861b
On 21 April 2010 02:03, Daniel Pfeiffer <perlbug-followup@perl.org> wrote: Show quoted text
> One of the utilities of makepp SEGVs in the regression test on each of Linux > x86 and Win (both ActiveState) and Solaris 10 Sparc self compiled as 32bit. > This last worked with CPAN testers on i86pc-solaris-V5.11.5. > > I have narrowed it down to the following little test: > > #!/usr/bin/perl -w > > sub f { >   lstat '/'; >   -d _; > } > > $_ = split /x/, f; > > The context split (with any regexp) is needed, though it crashes in -d _. > > #0  0x0810f3fb in Perl_pp_ftrowned () > #1  0x080cb352 in Perl_runops_standard () > #2  0x08074af2 in S_run_body () > #3  0x0807498a in perl_run () > #4  0x08060ded in main () > > Besides a fix for future versions, I am desperate for a workaround ;-)
Apparently, a workaround is to use a perl compiled with -DDEBUGGING support...
CC: perl5-porters [...] perl.org, bugs-bitbucket [...] rt.perl.org
Subject: Re: [perl #74542] 5.12.0 crash on diverse platforms
Date: Wed, 21 Apr 2010 14:34:05 +0100
To: Rafael Garcia-Suarez <rgs [...] consttype.org>
From: Nicholas Clark <nick [...] ccl4.org>
Download (untitled) / with headers
text/plain 4.2k
On Wed, Apr 21, 2010 at 03:08:58PM +0200, Rafael Garcia-Suarez wrote: Show quoted text
> On 21 April 2010 02:03, Daniel Pfeiffer <perlbug-followup@perl.org> wrote:
> > One of the utilities of makepp SEGVs in the regression test on each of Linux > > x86 and Win (both ActiveState) and Solaris 10 Sparc self compiled as 32bit. > > This last worked with CPAN testers on i86pc-solaris-V5.11.5. > > > > I have narrowed it down to the following little test: > > > > #!/usr/bin/perl -w > > > > sub f { > >   lstat '/'; > >   -d _; > > } > > > > $_ = split /x/, f; > > > > The context split (with any regexp) is needed, though it crashes in -d _. > > > > #0  0x0810f3fb in Perl_pp_ftrowned () > > #1  0x080cb352 in Perl_runops_standard () > > #2  0x08074af2 in S_run_body () > > #3  0x0807498a in perl_run () > > #4  0x08060ded in main () > > > > Besides a fix for future versions, I am desperate for a workaround ;-)
> > Apparently, a workaround is to use a perl compiled with -DDEBUGGING support...
I'm not sure. I've now build a perl without that on Linux, and I see no problem either. I can't replicate this. $ ./perl -Ilib -V Summary of my perl5 (revision 5 version 13 subversion 0) configuration: Derived from: f768f60b565004f735138c26b9a0823b95e9f470 Platform: osname=linux, osvers=2.6.18.8-xenu, archname=x86_64-linux uname='linux eris 2.6.18.8-xenu #1 smp sat oct 3 10:27:42 bst 2009 x86_64 gnulinux ' config_args='-Dusedevel=y -Dcc=ccache gcc -Dld=gcc -Ubincompat5005 -Uinstallusrbinperl -Dcf_email=nick@ccl4.org -Dperladmin=nick@ccl4.org -Dinc_version_list= -Dinc_version_list_init=0 -Doptimize=-Os -Uusethreads -Uuse64bitall -Uusemymalloc -Duseperlio -Dprefix=~/Sandpit/snap5.9.x-v5.13.0-14-gf768f60 -Uusevendorprefix -Uvendorprefix=~/Sandpit/snap5.9.x-v5.13.0-14-gf768f60 -Dinstallman1dir=none -Dinstallman3dir=none -Uuserelocatableinc -de' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='ccache gcc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-Os', cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.3.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='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='gcc', ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.7.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.7' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -Os -L/usr/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP PERL_USE_DEVEL USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF Locally applied patches: uncommitted-changes Built under linux Compiled at Apr 21 2010 14:21:19 @INC: lib /home/nick/Sandpit/snap5.9.x-v5.13.0-14-gf768f60/lib/perl5/site_perl/5.13.0/x86_64-linux /home/nick/Sandpit/snap5.9.x-v5.13.0-14-gf768f60/lib/perl5/site_perl/5.13.0 /home/nick/Sandpit/snap5.9.x-v5.13.0-14-gf768f60/lib/perl5/5.13.0/x86_64-linux /home/nick/Sandpit/snap5.9.x-v5.13.0-14-gf768f60/lib/perl5/5.13.0 . So I'm not sure how to replicate this, or, for that matter, what changes ActiveState make from the 5.12.0 release to build their perl A: could you send the output of perl -V for your perl on Linux B: are you able to build the 5.12.0 release from source (on Linux is most useful) and replicate your problem with that? Stack traces sadly aren't that useful unless they have debugging symbols. (Source is at http://www.cpan.org/src/perl-5.12.0.tar.bz2 for example) Nicholas Clark
Subject: Re: [perl #74542] 5.12.0 crash on diverse platforms
Date: Wed, 21 Apr 2010 09:37:11 -0400
To: perl5-porters [...] perl.org, bugs-bitbucket [...] rt.perl.org
From: "Jerry D. Hedden" <jdhedden [...] cpan.org>
Download (untitled) / with headers
text/plain 1.2k
On Wed, Apr 21, 2010 at 09:34, Nicholas Clark <nick@ccl4.org> wrote: Show quoted text
> On Wed, Apr 21, 2010 at 03:08:58PM +0200, Rafael Garcia-Suarez wrote:
>> On 21 April 2010 02:03, Daniel Pfeiffer <perlbug-followup@perl.org> wrote:
>> > One of the utilities of makepp SEGVs in the regression test on each of Linux >> > x86 and Win (both ActiveState) and Solaris 10 Sparc self compiled as 32bit. >> > This last worked with CPAN testers on i86pc-solaris-V5.11.5. >> > >> > I have narrowed it down to the following little test: >> > >> > #!/usr/bin/perl -w >> > >> > sub f { >> >   lstat '/'; >> >   -d _; >> > } >> > >> > $_ = split /x/, f; >> > >> > The context split (with any regexp) is needed, though it crashes in -d _. >> > >> > #0  0x0810f3fb in Perl_pp_ftrowned () >> > #1  0x080cb352 in Perl_runops_standard () >> > #2  0x08074af2 in S_run_body () >> > #3  0x0807498a in perl_run () >> > #4  0x08060ded in main () >> > >> > Besides a fix for future versions, I am desperate for a workaround ;-)
>> >> Apparently, a workaround is to use a perl compiled with -DDEBUGGING support...
> > I'm not sure. I've now build a perl without that on Linux, and I see no > problem either. I can't replicate this.
I tried this with blead under Cygwin on Windows, and it segfaults.
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.1k
This is now fixed by the patch below, which I would like to nominate for inclusion in 5.12.1. commit 94fa954eaae532928977ae7f7290536783269b6e Author: Rafael Garcia-Suarez <rgs@consttype.org> Date: Wed Apr 21 15:47:36 2010 +0200 Fix [perl #74542] 5.12.0 crash on diverse platforms Filetest ops don't always expect an op on the stack, so we should use TOPs only if we're sure that we're not stat'ing the _ filehandle. This is indicated by OPf_KIDS (as checked in ck_ftst). diff --git a/pp.h b/pp.h index 9d078af..c36502a 100644 --- a/pp.h +++ b/pp.h @@ -474,7 +474,8 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>. #define tryAMAGICftest(chr) \ STMT_START { \ assert(chr != '?'); \ - if (SvAMAGIC(TOPs)) { \ + if ((PL_op->op_flags & OPf_KIDS) \ + && SvAMAGIC(TOPs)) { \ const char tmpchr = (chr); \ SV * const tmpsv = amagic_call(TOPs, \ newSVpvn_flags(&tmpchr, 1, SVs_TEMP), \
Subject: Re: [perl #74542] 5.12.0 crash on diverse platforms
Date: Wed, 21 Apr 2010 15:59:40 +0200
To: perl5-porters [...] perl.org
From: Vincent Pit <perl [...] profvince.com>
Download (untitled) / with headers
text/plain 981b
Show quoted text
> On 21 April 2010 02:03, Daniel Pfeiffer<perlbug-followup@perl.org> wrote: >
>> One of the utilities of makepp SEGVs in the regression test on each of Linux >> x86 and Win (both ActiveState) and Solaris 10 Sparc self compiled as 32bit. >> This last worked with CPAN testers on i86pc-solaris-V5.11.5. >> >> I have narrowed it down to the following little test: >> >> #!/usr/bin/perl -w >> >> sub f { >> lstat '/'; >> -d _; >> } >> >> $_ = split /x/, f; >> >> The context split (with any regexp) is needed, though it crashes in -d _. >> >> #0 0x0810f3fb in Perl_pp_ftrowned () >> #1 0x080cb352 in Perl_runops_standard () >> #2 0x08074af2 in S_run_body () >> #3 0x0807498a in perl_run () >> #4 0x08060ded in main () >> >> Besides a fix for future versions, I am desperate for a workaround ;-) >>
> Apparently, a workaround is to use a perl compiled with -DDEBUGGING support... >
Replacing the bare '_' with '*_' will also prevent the segfault. Vincent.
Subject: Re: [perl #74542] 5.12.0 crash on diverse platforms
Date: Wed, 21 Apr 2010 16:37:53 +0200
To: perl5-porters [...] perl.org
From: Vincent Pit <perl [...] profvince.com>
Download (untitled) / with headers
text/plain 133b
Show quoted text
> This is now fixed by the patch below, which I would like to nominate for inclusion in 5.12.1. >
I approve of this patch. V.
CC: perl5-porters [...] perl.org
Subject: Re: [perl #74542] 5.12.0 crash on diverse platforms
Date: Thu, 22 Apr 2010 03:24:54 -0400
To: Vincent Pit <perl [...] profvince.com>
From: Jesse Vincent <jesse [...] fsck.com>
Download (untitled) / with headers
text/plain 210b
On Wed, Apr 21, 2010 at 04:37:53PM +0200, Vincent Pit wrote: Show quoted text
>
> >This is now fixed by the patch below, which I would like to nominate for inclusion in 5.12.1.
> I approve of this patch.
+1 Show quoted text
> > V.
--


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