Navigation Menu

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

Perl fails with message 'panic: attempt to copy freed scalar' #13622

Open
p5pRT opened this issue Feb 26, 2014 · 4 comments
Open

Perl fails with message 'panic: attempt to copy freed scalar' #13622

p5pRT opened this issue Feb 26, 2014 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 26, 2014

Migrated from rt.perl.org#121328 (status was 'open')

Searchable as RT121328$

@p5pRT
Copy link
Author

p5pRT commented Feb 26, 2014

From mark+perlbug@carnildo.com

Created by mark+perlbug@carnildo.com

Running the following program as 'perl crash.pl --help' fails with the
error message 'panic​: attempt to copy freed scalar 1a63798 to 1a4fde8
at crash.pl line 11'

#!/usr/bin/perl
sub dfunc
{
  shift @​{$_[0]};
}
sub ParseOptions
{
  dfunc(\@​ARGV);
  return @​_;
}
@​args = ParseOptions(@​ARGV);

This crash is present in both verisons 5.16.3 and 5.18.1.

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.18.1:

Configured by Gentoo at Wed Feb 26 08:23:55 UTC 2014.

Summary of my perl5 (revision 5 version 18 subversion 1) configuration:
   
  Platform:
    osname=linux, osvers=3.10.25-gentoo, archname=x86_64-linux
    uname='linux localhost 3.10.25-gentoo #1 wed feb 26 06:37:30 utc
2014 x86_64 intel(r) core(tm) i7-3930k cpu @ 3.20ghz genuineintel
gnulinux ' config_args='-des -Duseshrplib -Darchname=x86_64-linux
-Dcc=x86_64-pc-linux-gnu-gcc -Doptimize=-O2 -pipe -march=native
-Dldflags=-Wl,-O1 -Wl,--as-needed -Dprefix=/usr -Dinstallprefix=/usr
-Dsiteprefix=/usr/local -Dvendorprefix=/usr -Dscriptdir=/usr/bin
-Dprivlib=/usr/lib64/perl5/5.18.1
-Darchlib=/usr/lib64/perl5/5.18.1/x86_64-linux
-Dsitelib=/usr/local/lib64/perl5/5.18.1
-Dsitearch=/usr/local/lib64/perl5/5.18.1/x86_64-linux
-Dvendorlib=/usr/lib64/perl5/vendor_perl/5.18.1
-Dvendorarch=/usr/lib64/perl5/vendor_perl/5.18.1/x86_64-linux
-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.1
-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 -DDEBUGGING=none
-Dinc_version_list=5.18.0/x86_64-linux 5.18.0
-Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Dnoextensions=ODBM_File'
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='x86_64-pc-linux-gnu-gcc', ccflags
='-fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64', optimize='-O2 -pipe -march=native',
cppflags='-fno-strict-aliasing -pipe -fstack-protector' 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 -fstack-protector'
libpth=/usr/local/lib64 /lib64 /usr/lib64 libs=-lnsl -lgdbm -ldb -ldl
-lm -lcrypt -lutil -lc -lgdbm_compat perllibs=-lnsl -ldl -lm -lcrypt
-lutil -lc libc=/lib/libc-2.17.so, so=so, useshrplib=true,
libperl=libperl.so.5.18.1 gnulibc_version='2.17' Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-rpath,/usr/lib64/perl5/5.18.1/x86_64-linux/CORE'
cccdlflags='-fPIC', lddlflags='-shared -O2 -pipe -march=native
-fstack-protector'

Locally applied patches:
    


@INC for perl 5.18.1:
    /usr/local/lib64/perl5/5.18.1/x86_64-linux
    /usr/local/lib64/perl5/5.18.1
    /usr/lib64/perl5/vendor_perl/5.18.1/x86_64-linux
    /usr/lib64/perl5/vendor_perl/5.18.1
    /usr/lib64/perl5/5.18.1/x86_64-linux
    /usr/lib64/perl5/5.18.1
    /usr/local/lib64/perl5
    /usr/lib64/perl5/vendor_perl
    .


Environment for perl 5.18.1:
    HOME=/root
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.3
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Feb 27, 2014

From @iabyn

On Wed, Feb 26, 2014 at 01​:00​:19AM -0800, Mark Wagner wrote​:

Running the following program as 'perl crash.pl --help' fails with the
error message 'panic​: attempt to copy freed scalar 1a63798 to 1a4fde8
at crash.pl line 11'

#!/usr/bin/perl
sub dfunc
{
shift @​{$_[0]};
}
sub ParseOptions
{
dfunc(\@​ARGV);
return @​_;
}
@​args = ParseOptions(@​ARGV);

This crash is present in both verisons 5.16.3 and 5.18.1.

Chalk up another one to "the stack args / @​_" aren't reference counted.

--
Never do today what you can put off till tomorrow.

@p5pRT
Copy link
Author

p5pRT commented Feb 27, 2014

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

@Carnildo
Copy link

It appears to be fixed as of 5.30.1.

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

3 participants