develooper Front page | perl.perl5.porters | Postings from March 2007

[perl #42166] panic copying freed scalar in Carp::Heavy

david @ mongueurs . net
March 29, 2007 23:58
[perl #42166] panic copying freed scalar in Carp::Heavy
Message ID:
# New Ticket Created by 
# Please include the string:  [perl #42166]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
generated with the help of perlbug 1.35 running under perl 5.9.5.

[Please enter your report here]

Passing @ARGV to a function, and then shifting @ARGV directly and carping the value
results in rather strang errors:

In blead:
david@profane:~/perl% perl5.9.5 -MCarp -le 'f(@ARGV); sub f { my $x = shift(@ARGV); carp($x)}' a v
panic: attempt to copy freed scalar 8134d84 to 8164194 at /usr/local/lib/perl5/5.9.5/Carp/ line 104.

in 5.8.8:
david@profane:~/perl% perl -MCarp -le 'f(@ARGV); sub f { my $x = shift(@ARGV); carp($x)}' a v
Bizarre copy of ARRAY in sassign at /usr/local/lib/perl5/5.8.8/Carp/ line 45.

Someone posted this to Perlmonks:


[Please do not change anything below this line]
Site configuration information for perl 5.9.5:

Configured by david at Fri Mar 23 09:23:03 CET 2007.

Summary of my perl5 (revision 5 version 9 subversion 5 patch 30712) configuration:
    osname=freebsd, osvers=6.0-stable, archname=i386-freebsd
    uname='freebsd 6.0-stable freebsd 6.0-stable #5: fri feb 24 11:12:56 cet 2006 i386 '
    config_args='-de -Dusemymalloc -Dusedevel -Duseithreads -Accflags=-DPERL_COPY_ON_WRITE -DPERL_DONT_CREATE_GVSV'
    hint=previous, 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=y, bincompat5005=undef
    cc='cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DPERL_DONT_CREATE_GVSV -fno-strict-aliasing -pipe -I/usr/local/include -DPERL_DONT_CREATE_GVSV -DPERL_COPY_ON_WRITE',
    cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DPERL_DONT_CREATE_GVSV -fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='3.4.4 [FreeBSD] 20050518', 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 ='-Wl,-E  -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lgdbm -lm -lcrypt -lutil -lc
    perllibs=-lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib'

Locally applied patches:

@INC for perl 5.9.5:

Environment for perl 5.9.5:
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/bash Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About