Skip Menu |
Report information
Id: 16113
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: pixel [at] mandrakesoft.com
Cc:
AdminCc:

Operating System: Linux
PatchStatus: (no value)
Severity: medium
Type:
Perl Version: 5.8.0
Fixed In: (no value)



To: perlbug [...] perl.org
Cc: Fran
Download (untitled) / with headers
text/plain 3.8k
This is a bug report for perl from pixel@localhost.localdomain, generated with the help of perlbug 1.34 running under perl v5.8.0. ----------------------------------------------------------------- [Please enter your report here] my $fh = do { local *F; open(F, '/etc/passwd'); *F }; print <$fh>; doesn't work in 5.8.0, whereas it works in 5.6.1, and the following works too: my $fh = do { local *F; open(*F, '/etc/passwd'); *F }; print <$fh>; [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=medium --- Site configuration information for perl v5.8.0: Configured by pixel at Fri Aug 2 11:57:47 CEST 2002. Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=linux, osvers=2.4.18-22mdksmp, archname=i386-linux-thread-multi uname='linux no.mandrakesoft.com 2.4.18-22mdksmp #1 smp thu aug 1 19:53:35 cest 2002 i686 unknown ' config_args='-des -Darchname=i386-linux -Dcc=gcc -Doptimize=-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dman3ext=3pm -Dcf_by=MandrakeSoft -Dmyhostname=localhost -Dperladmin=root@localhost -Dd_dosuid -Ud_csh -Duseshrplib -Dusethreads' 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=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdbm' ccversion='', gccversion='3.2 (Mandrake Linux 9.0 3.2-0.2mdk)', 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='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lndbm -lgdbm -ldl -lm -lpthread -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil libc=/lib/libc-2.2.5.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Locally applied patches: --- @INC for perl v5.8.0: /home/pixel/etc/perl /home/pixel/etc/perl/i386-linux /home/pixel/etc/perl/site_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl . --- Environment for perl v5.8.0: HOME=/home/pixel LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH=/home/pixel/lib/i386 LOGDIR (unset) PATH=/home/pixel/bin:/home/pixel/bin/oneliner:/home/pixel/bin/perl:/home/pixel/bin/ruby:/home/pixel/bin/python:/home/pixel/bin/tcl:/home/pixel/bin/i386:/usr/freeware/bin:/usr/etc:/usr/local/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/bin:/usr/bin:/usr/local/bin:/root/bin:/root/bin:/usr/X11R6/bin PERL5LIB=/home/pixel/etc/perl:/home/pixel/etc/perl/i386-linux:/home/pixel/etc/perl/site_perl PERL_BADLANG (unset) SHELL=/bin/bash
Date: Sat, 10 Aug 2002 23:23:17 +0200
From: Rafael Garcia-Suarez <rgarciasuarez [...] free.fr>
To: perl5-porters [...] perl.org
Cc: perlbug [...] perl.org, bugs-bitbucket [...] netlabs.develooper.com
Subject: Re: [perl #16113] open on localized *F pb
RT-Send-Cc:
Download (untitled) / with headers
text/plain 298b
Pixel (via RT) wrote: Show quoted text
> my $fh = do { local *F; open(F, '/etc/passwd'); *F }; > print <$fh>; > > doesn't work in 5.8.0, whereas it works in 5.6.1, and the following > works too: > > my $fh = do { local *F; open(*F, '/etc/passwd'); *F }; > print <$fh>;
Apparently this only occurs with ithreads.
Cc: bugs-bitbucket [...] netlabs.develooper.com
Subject: Re: [perl #16113] open on localized *F pb
To: perl5-porters [...] perl.org
Date: Sun, 11 Aug 2002 13:00:35 +0100
From: Nick Ing-Simmons <nick [...] ing-simmons.net>
RT-Send-Cc:
Download (untitled) / with headers
text/plain 4.5k
Pixel <perl5-porters@perl.org> writes: Show quoted text
># New Ticket Created by Pixel ># Please include the string: [perl #16113] ># in the subject line of all future correspondence about this issue. ># <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=16113 > > > >This is a bug report for perl from pixel@localhost.localdomain, >generated with the help of perlbug 1.34 running under perl v5.8.0. > > >----------------------------------------------------------------- >[Please enter your report here] > >my $fh = do { local *F; open(F, '/etc/passwd'); *F }; >print <$fh>; > >doesn't work in 5.8.0, whereas it works in 5.6.1, and the following >works too: > >my $fh = do { local *F; open(*F, '/etc/passwd'); *F }; >print <$fh>;
And open(my $fh,'/etc/passwd'); print <$fh>; should work both places as well. The accepted thing to do was to return a reference to the glob. IIRC we "fixed" a feature that localized globs were not being de-localized "right". Returning a reference to the local glob should still work. But the open(my $fh,...) is prefered for 5.6.1+ Show quoted text
> > >[Please do not change anything below this line] >----------------------------------------------------------------- >--- >Flags: > category=core > severity=medium >--- >Site configuration information for perl v5.8.0: > >Configured by pixel at Fri Aug 2 11:57:47 CEST 2002. > >Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: > Platform: > osname=linux, osvers=2.4.18-22mdksmp, archname=i386-linux-thread-multi > uname='linux no.mandrakesoft.com 2.4.18-22mdksmp #1 smp thu aug 1 19:53:35 cest 2002 i686 unknown ' > config_args='-des -Darchname=i386-linux -Dcc=gcc -Doptimize=-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dman3ext=3pm -Dcf_by=MandrakeSoft -Dmyhostname=localhost -Dperladmin=root@localhost -Dd_dosuid -Ud_csh -Duseshrplib -Dusethreads' > 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=undef use64bitall=undef uselongdouble=undef > usemymalloc=n, bincompat5005=undef > Compiler: > cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', > optimize='-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce', > cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdbm' > ccversion='', gccversion='3.2 (Mandrake Linux 9.0 3.2-0.2mdk)', 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='gcc', ldflags =' -L/usr/local/lib' > libpth=/usr/local/lib /lib /usr/lib > libs=-lnsl -lndbm -lgdbm -ldl -lm -lpthread -lc -lcrypt -lutil > perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil > libc=/lib/libc-2.2.5.so, so=so, useshrplib=true, libperl=libperl.so > gnulibc_version='2.2.5' > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE' > cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' > >Locally applied patches: > > >--- >@INC for perl v5.8.0: > /home/pixel/etc/perl > /home/pixel/etc/perl/i386-linux > /home/pixel/etc/perl/site_perl > /usr/lib/perl5/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/5.8.0 > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.0 > /usr/lib/perl5/site_perl > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.0 > /usr/lib/perl5/vendor_perl > . > >--- >Environment for perl v5.8.0: > HOME=/home/pixel > LANG (unset) > LANGUAGE (unset) > LD_LIBRARY_PATH=/home/pixel/lib/i386 > LOGDIR (unset) > PATH=/home/pixel/bin:/home/pixel/bin/oneliner:/home/pixel/bin/perl:/home/pixel/bin/ruby:/home/pixel/bin/python:/home/pixel/bin/tcl:/home/pixel/bin/i386:/usr/freeware/bin:/usr/etc:/usr/local/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/bin:/usr/bin:/usr/local/bin:/root/bin:/root/bin:/usr/X11R6/bin > PERL5LIB=/home/pixel/etc/perl:/home/pixel/etc/perl/i386-linux:/home/pixel/etc/perl/site_perl > PERL_BADLANG (unset) > SHELL=/bin/bash
-- Nick Ing-Simmons http://www.ni-s.u-net.com/
From: Zefram <zefram [...] fysh.org>
Date: Tue, 16 Jan 2018 10:28:40 +0000
Subject: Re: [perl #16113] open on localized *F pb
To: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 149b
This was fixed, apparently unintentionally, by commit 60779a30f61297ad86e175f686b7bc697c7b8e51 in Perl 5.19.10. This ticket can be closed. -zefram
RT-Send-CC: perl5-porters [...] perl.org
Confirmed; closing. -- James E Keenan (jkeenan@cpan.org)
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 130b
On Tue, 16 Jan 2018 05:28:02 -0800, jkeenan wrote: Show quoted text
> Confirmed; closing.
But what about adding a test? -- Father Chrysostomos
From: Zefram <zefram [...] fysh.org>
Date: Tue, 16 Jan 2018 18:12:21 +0000
Subject: Re: [perl #16113] open on localized *F pb
To: perl5-porters [...] perl.org
Test added in commit c7a9a2576639091bf1e3c8d8e712b5480d67d442. -zefram


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org