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

segfault when glob of loop var gets freed #6355

Closed
p5pRT opened this issue Mar 5, 2003 · 5 comments
Closed

segfault when glob of loop var gets freed #6355

p5pRT opened this issue Mar 5, 2003 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 5, 2003

Migrated from rt.perl.org#21469 (status was 'resolved')

Searchable as RT21469$

@p5pRT
Copy link
Author

p5pRT commented Mar 5, 2003

From xmath@cpan.org

Created by xmath@cpan.org.

If the GP of a loop var is freed inside the loop, perl segfaults

Example​: perl -e 'for $x (1) { *x = *y }'

Solution​: the loop context should increment the refcount of the GP

Perl Info

Flags:
    category=core
    severity=medium

Site configuration information for perl v5.8.0:

Configured by xmath at Tue Jan 28 23:54:19 CET 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=darwin, osvers=6.3, archname=darwin
    uname='darwin quoose.local. 6.3 darwin kernel version 6.3: sat dec 14 03:11:25 pst 2002; root:xnuxnu-344.23.obj~4release_ppc power macintosh powerpc '
    config_args='-de -Dprefix=/usr -Dgroupcat=nidump group . -Dhostcat=nidump hosts . -Dpasscat=nidump passwd .'
    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 -no-cpp-precomp -fno-strict-aliasing',
    optimize='-O3',
    cppflags='-no-cpp-precomp -pipe -fno-common -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'
    libpth=/usr/lib
    libs=-lm -lc
    perllibs=-lm -lc
    libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, libperl=libperl.dylib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -flat_namespace -bundle -undefined suppress'

Locally applied patches:
    


@INC for perl v5.8.0:
    /sw/lib/perl5/darwin
    /sw/lib/perl5
    /System/Library/Perl/darwin
    /System/Library/Perl
    /Library/Perl/darwin
    /Library/Perl
    /Library/Perl
    /Network/Library/Perl/darwin
    /Network/Library/Perl
    /Network/Library/Perl
    .


Environment for perl v5.8.0:
    DYLD_LIBRARY_PATH (unset)
    HOME=/Users/xmath
    LANG=en_US
    LANGUAGE (unset)
    LC_ALL=C
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/Developer/Tools
    PERL5LIB=/sw/lib/perl5
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh

@p5pRT
Copy link
Author

p5pRT commented Dec 13, 2004

From @schwern

I confirm. Still a problem with 5.8.6 and bleadperl.

@p5pRT
Copy link
Author

p5pRT commented Dec 13, 2004

@schwern - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Sep 8, 2010

From @iabyn

Now fixed with commit f83b46a,

which also depends on a series of previous commits that cleaned up the
iteration code​:

d57ce4d ..
aafca52

@p5pRT
Copy link
Author

p5pRT commented Sep 8, 2010

@iabyn - Status changed from 'open' to 'resolved'

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

1 participant