develooper Front page | perl.perl5.porters | Postings from January 2004

[perl #24940] "sub foo :unique" segfaults

Thread Next
From:
Steve Grazzini
Date:
January 18, 2004 17:18
Subject:
[perl #24940] "sub foo :unique" segfaults
Message ID:
rt-3.0.8-24940-70133.7.7098418042744@perl.org
# New Ticket Created by  Steve Grazzini 
# Please include the string:  [perl #24940]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=24940 >


This is a bug report for perl from grazz@pobox.com,
generated with the help of perlbug 1.34 running under perl v5.8.3.


-----------------------------------------------------------------

     % perl -e 'sub foo :unique'
     Bus error

It seems to blow up here

     xsutils.c:102:
     --------------
		if (strEQ(name, "unique")) {
             if (negated)
                 GvUNIQUE_off(CvGV((CV*)sv));
             else
                 GvUNIQUE_on(CvGV((CV*)sv));
             continue;
         }

Because the attributes are applied before CvGV(cv) is set.

-----------------------------------------------------------------
---
Flags:
     category=core
     severity=low
---
Site configuration information for perl v5.8.3:

Configured by grazz at Sat Jan 17 14:19:04 EST 2004.

Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration:
   Platform:
     osname=darwin, osvers=6.6, archname=darwin
     uname='darwin faure.grazzini.net 6.6 darwin kernel version 6.6: thu  
may 1 21:48:54 pdt 2003; root:xnuxnu-344.34.obj~1release_ppc power  
macintosh powerpc '
     config_args='-DDEBUGGING -de'
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=undef use5005threads=undef useithreads=undef  
usemultiplicity=undef
     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
     use64bitint=undef use64bitall=undef uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='cc', ccflags ='-pipe -fno-common -DPERL_DARWIN -no-cpp-precomp  
-fno-strict-aliasing',
     optimize='-Os',
     cppflags='-no-cpp-precomp -pipe -fno-common -DPERL_DARWIN  
-no-cpp-precomp -fno-strict-aliasing'
     ccversion='', gccversion='3.1 20020420 (prerelease)',  
gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',  
lseeksize=8
     alignbytes=8, prototype=define
   Linker and Libraries:
     ld='cc', ldflags =' -flat_namespace -L/usr/local/lib'
     libpth=/usr/local/lib /usr/lib
     libs=-lm -lc
     perllibs=-lm -lc
     libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false,  
libperl=libperl.a
     gnulibc_version=''
   Dynamic Linking:
     dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
     cccdlflags=' ', lddlflags=' -flat_namespace -bundle -undefined  
suppress -L/usr/local/lib'

Locally applied patches:


---
@INC for perl v5.8.3:
     /sw/lib/perl5/darwin
     /sw/lib/perl5
     /usr/local/lib/perl5/5.8.3/darwin
     /usr/local/lib/perl5/5.8.3
     /usr/local/lib/perl5/site_perl/5.8.3/darwin
     /usr/local/lib/perl5/site_perl/5.8.3
     /usr/local/lib/perl5/site_perl/5.8.2/darwin
     /usr/local/lib/perl5/site_perl/5.8.2
     /usr/local/lib/perl5/site_perl
     .

---
Environment for perl v5.8.3:
     DYLD_LIBRARY_PATH (unset)
     HOME=/Users/grazz
     LANG=C
     LANGUAGE (unset)
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
      
PATH=/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/grazz:/usr/ 
X11R6/bin
     PERL5LIB=/sw/lib/perl5
     PERL_BADLANG (unset)
     SHELL=/bin/bash

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About