Skip Menu |

This queue is for tickets about the indirect CPAN distribution.

Report information
The Basics
Id: 115392
Status: resolved
Priority: 0/
Queue: indirect

People
Owner: Nobody in particular
Requestors: haarg [...] haarg.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.37



Subject: Intermittent segfaults with heredocs
I've been getting intermittent segfaults on one of my tests. I've reduced down the trigger to the following: no indirect; q{ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx }; <<'END_CODE2'; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx END_CODE2 I haven't been able to reproduce the issue without a heredoc and another string. perl 5.18-5.22 are effected. 5.16 and 5.24 don't appear to be.
Thanks for your report. Unfortunately, I haven't been able to reproduce this issue. Could you attach the exact script with which you get this segfault, as well as the output of your perl -V ? Could you run it through gdb and/or valgrind? Do you need to have the same string in the string literal and the heredoc to observe the issue? What happens if the string literal is a prefix of the heredoc? Vincent
On Fri Jun 17 07:50:55 2016, VPIT wrote: Show quoted text
> Thanks for your report. Unfortunately, I haven't been able to > reproduce this issue. > > Could you attach the exact script with which you get this segfault, as > well as the output of your perl -V ? Could you run it through gdb > and/or valgrind? > > Do you need to have the same string in the string literal and the > heredoc to observe the issue? What happens if the string literal is a > prefix of the heredoc? > > > Vincent
I have been able to get a segfault with exactly the script I posted, but as I said it is intermittent. The strings don't have to match in any way, but the length makes a difference. I'm attaching a variant of the script that seems to segfault more regularly. perl -V included below. Summary of my perl5 (revision 5 version 22 subversion 0) configuration: Platform: osname=darwin, osvers=14.3.0, archname=darwin-2level uname='darwin cuneus 14.3.0 darwin kernel version 14.3.0: mon mar 23 11:59:05 pdt 2015; root:xnu-2782.20.48~5release_x86_64 x86_64 ' config_args='-des -Dusedevel -Uversiononly -Dprefix=/Users/gknop/perl5/perls/v5.22.0 -Uman1dir -Uman3dir' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include', optimize='-O3', cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='', gccversion='4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3 ivtype='long', ivsize=8, 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 =' -fstack-protector-strong -L/usr/local/lib -L/opt/local/lib' libpth=/usr/local/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.1.0/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib /usr/lib /opt/local/lib /lib libs=-lpthread -lgdbm -ldbm -ldb -ldl -lm -lutil -lc perllibs=-lpthread -ldl -lm -lutil -lc libc=, 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 -L/opt/local/lib -fstack-protector-strong' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF Locally applied patches: Devel::PatchPerl 1.30 Built under darwin Compiled at Jun 5 2015 08:12:53 %ENV: PERL5LIB="/Users/gknop/.local-lib/lib/perl5:/Users/gknop/perl5/libs/5.022000-darwin-2level/lib/perl5" PERL_CPANM_OPT="--mirror http://cpan.metacpan.org/ --no-uninst-shadows" PERL_LOCAL_LIB_ROOT="/Users/gknop/perl5/libs/5.022000-darwin-2level" PERL_MB_OPT="--install_base "/Users/gknop/perl5/libs/5.022000-darwin-2level"" PERL_MM_OPT="INSTALL_BASE=/Users/gknop/perl5/libs/5.022000-darwin-2level" @INC: /Users/gknop/.local-lib/lib/perl5/5.22.0/darwin-2level /Users/gknop/.local-lib/lib/perl5/5.22.0 /Users/gknop/.local-lib/lib/perl5/darwin-2level /Users/gknop/.local-lib/lib/perl5 /Users/gknop/perl5/libs/5.022000-darwin-2level/lib/perl5/5.22.0/darwin-2level /Users/gknop/perl5/libs/5.022000-darwin-2level/lib/perl5/5.22.0 /Users/gknop/perl5/libs/5.022000-darwin-2level/lib/perl5/darwin-2level /Users/gknop/perl5/libs/5.022000-darwin-2level/lib/perl5 /Users/gknop/perl5/perls/v5.22.0/lib/site_perl/5.22.0/darwin-2level /Users/gknop/perl5/perls/v5.22.0/lib/site_perl/5.22.0 /Users/gknop/perl5/perls/v5.22.0/lib/5.22.0/darwin-2level /Users/gknop/perl5/perls/v5.22.0/lib/5.22.0 .
Subject: ind.pl
no indirect; <<'END_CODE1'; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx END_CODE1 <<'END_CODE2'; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx END_CODE2
Thanks for your report. This has been fixed in version 0.37. Show quoted text
> I have been able to get a segfault with exactly the script I posted, > but as I said it is intermittent. The strings don't have to match in > any way, but the length makes a difference. I'm attaching a variant > of the script that seems to segfault more regularly. perl -V included > below. >
I just wanted to be sure that RT did not mangle the test case, as these kind of errors can be very sensitive to spaces in the source code. Vincent