List Info

Thread: foreach (0) { map { x() } 0 } causes attempt to free unreferenced scalar




foreach (0) { map { x() } 0 } causes attempt to free unreferenced scalar
user name
2007-09-19 07:24:26
# New Ticket Created by  "Ed Avis" 
# Please include the string:  [perl #45539]
# in the subject line of all future correspondence about
this issue. 
# <URL: h
ttp://rt.perl.org/rt3/Ticket/Display.html?id=45539 >


This one-liner causes perl to spit out an internal error
message.

C:>perl -e "foreach (0) { map { x() } 0 }"
Undefined subroutine &main:
called at -e line 1.
Attempt to free unreferenced scalar: SV 0x10033f4c, Perl
interpreter: 0x10015898.

C:>perl -v
perl -V
Summary of my perl5 (revision 5 version 8 subversion 8)
configuration:
  Platform:
    osname=cygwin, osvers=1.5.24(0.15642),
archname=cygwin-thread-multi-64int
    uname='cygwin_nt-5.1 reini 1.5.24(0.15642) 2007-01-31
10:57 i686 cygwin '
    config_args='-de -Dmksymlinks -Duse64bitint -Dusethreads
-Uusemymalloc -Doptimize=-O3 -Dman3ext=3pm
-Dusesitecustomize -Dusedevel'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef
useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define
usesocks=undef
    use64bitint=define use64bitall=undef
uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV
-fno-strict-aliasing -pipe -Wdeclaration-after-statement',
    optimize='-O3',
    cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing
-pipe -Wdeclaration-after-statement'
    ccversion='', gccversion='3.4.4 (cygming special, gdc
0.12, using dmd 0.125)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8,
byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8,
Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='ld2', ldflags =' -s -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib /lib
    libs=-lgdbm -ldb -ldl -lcrypt -lgdbm_compat
    perllibs=-ldl -lcrypt -lgdbm_compat
    libc=/usr/lib/libc.a, so=dll, useshrplib=true,
libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef,
ccdlflags=' -s'
    cccdlflags=' ', lddlflags=' -s -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
                        PERL_MALLOC_WRAP
PERL_USE_SAFE_PUTENV
                        USE_64_BIT_INT USE_ITHREADS
USE_LARGE_FILES
                        USE_PERLIO USE_REENTRANT_API
USE_SITECUSTOMIZE
  Locally applied patches:
	CYG01 - hints.cygwin.sh ldflags -s
	CYG02 - lib-ExtUtils-Embed insensitive against leading s
	CYG03 - lib-Test-Harness-Straps $ENV = ''
	CYG04 - major.version.cygwin.sh cygperl-5_8.dll and not
cygperl-5_8_x.dll
	CYG05 - add Win32CORE to core
	CYG07 - File-Spec-Cygwin-TMPDIR.patch
	Bug#38628 - allow legacy Cwd->cwd()
	Bug#40103 - File-Spec-case_tolerant.patch from 5.9.5
  Built under cygwin
  Compiled at Jul  8 2007 19:12:08
  %ENV:
   
PERL5LIB="/cygdrive/h/lib/perl5/site_perl/5.8"
    CYGWIN=""
  INC:
    /cygdrive/h/lib/perl5/site_perl/5.8
    /usr/lib/perl5/5.8/cygwin
    /usr/lib/perl5/5.8
    /usr/lib/perl5/site_perl/5.8/cygwin
    /usr/lib/perl5/site_perl/5.8
    /usr/lib/perl5/site_perl/5.8
    /usr/lib/perl5/vendor_perl/5.8/cygwin
    /usr/lib/perl5/vendor_perl/5.8
    /usr/lib/perl5/vendor_perl/5.8
    .

-- 
Ed Avis <edawaniasset.com>

____________________________________________________________
__________
This email has been scanned by the MessageLabs Email
Security System.
For more information please visit http://www.messagela
bs.com/email 
____________________________________________________________
__________


Re: foreach (0) { map { x() } 0 } causes attempt to free unreferenced scalar
user name
2007-09-19 20:07:27
> This one-liner causes perl to spit out an internal
error message.
>
> C:>perl -e "foreach (0) { map { x() } 0
}"
> Undefined subroutine &main:
called at -e line 1.
> Attempt to free unreferenced scalar: SV 0x10033f4c,
Perl interpreter: 0x10015898.

Under blead, it does not report the "Attempt to free
unreferenced scalar" error; just the "Undefined
subroutine"
error.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )