develooper Front page | perl.perl5.porters | Postings from April 2003

[perl #21914] 3-arg open + local $fh + strict coredump

Thread Previous | Thread Next
Jarkko Hietaniemi
April 9, 2003 11:44
[perl #21914] 3-arg open + local $fh + strict coredump
Message ID:
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #21914]
# 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.34 running under perl v5.8.0.

[Please enter your report here]

At some point after 5.8.0 the following code

use strict;
open(local $f, '<', '/might/exist/might/not');
my @rows = <$f>;

changed behaviour from

Global symbol "$f" requires explicit package name at o.t line 2.
Global symbol "$f" requires explicit package name at o.t line 3.
Execution of o.t aborted due to compilation errors.


zsh: 386540 segmentation fault (core dumped)  ./perl -Ilib o.t

dbx version 5.1
Type 'help' for help.
Core file created by program "perl"

signal Segmentation fault at   [Perl_newASSIGNOP:3089 +0x14,0x3ffbff03204]     if (gv == PL_defgv || (int)SvCUR(gv) == PL_generation)
(dbx) where
>  0 Perl_newASSIGNOP(flags = 64, left = 0x140017050, optype = 0, right = 0x140026380) ["op.c":3089, 0x3ffbff03204]
   1 Perl_yyparse() ["perly.c":523, 0x3ffbfef7ac0]
   2 S_parse_body(env = (nil), xsinit = 0x120001f88) ["perl.c":1425, 0x3ffbfec2c44]
   3 perl_parse(my_perl = 0x1400041a0, xsinit = 0x120001f88, argc = 3, argv = 0x11fffc018, env = (nil)) ["perl.c":935, 0x3ffbfec1888]
   4 main(argc = 3, argv = 0x11fffc018, env = 0x11fffc038) ["perlmain.c":83, 0x120001f00]

I found this while playing with op.c and open.t (changes #19172
and #19173).  At first I thought I had broken open.t with those
patches, but retracting those patches didn't remove the segfault...

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

Configured by jhi at Wed Aug  7 21:21:34 EET DST 2002.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
    osname=dec_osf, osvers=4.0d, archname=alpha-dec_osf-thread-multi
    uname='osf1 v4.0 878 alpha '
    config_args='-des -Duseithreads -Doptimize=-g -Dprefix=/u/vieraat/vieraat/jhi/Perl/platform/OSF1'
    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=define uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    cc='cc', ccflags ='-pthread -std -fprm d -ieee -DDEBUGGING -DLANGUAGE_C',
    cppflags='-pthread -std -ieee -DDEBUGGING -DLANGUAGE_C'
    ccversion='V5.6-082', gccversion='', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =''
    libpth=/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /var/shlib
    libs=-ldbm -ldb -lm -lutil -lpthread -lexc
    perllibs=-lm -lutil -lpthread -lexc
    libc=/usr/shlib/, so=so, useshrplib=true,
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -Wl,-rpath,/u/vieraat/vieraat/jhi/Perl/platform/OSF1/lib/perl5/5.8.0/alpha-dec_osf-thread-multi/CORE'
    cccdlflags=' ', lddlflags='-shared -expect_unresolved "*" -msym -std'

Locally applied patches:

@INC for perl v5.8.0:

Environment for perl v5.8.0:
    LANGUAGE (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About