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
Filehandle opened from ref to ref hangs on reading #13213
Comments
From @epaCreated by @epaThis causes perl to hang chewing CPU: my $x = \42; Perl Info
|
From victor@vsespb.ruOn Fri Aug 30 10:48:16 2013, eda@waniasset.com wrote:
and RAM, at least under 5.19.3 |
The RT System itself - Status changed from 'new' to 'open' |
From @wolfsageOn Fri, Aug 30, 2013 at 1:48 PM, Ed Avis <perlbug-followup@perl.org> wrote:
This seems to be in sv.c, in Perl_sv_gets, in the loop starting here, at 8097 for (;;) { I haven't chased it any further. I didn't see it on perl-5.10.1, but I do -- Matthew Horsfall (alh) |
From @cpansproutOn Fri Aug 30 12:46:31 2013, alh wrote:
$ ../perl.git/Porting/bisect.pl --start=v5.10.0 --end=v5.12.4 -e 'alarm RT 43789: "in memory" files don't call STORE -- Father Chrysostomos |
From @epaIn general I suggest that opening a filehandle giving a reference to a reference doesn't make any sense, and surely didn't do anything useful even before the change identified. It would be better to make it throw an exception. Similarly I suggest that open $fh, '<', \undef should also throw. ______________________________________________________________________ |
From @iabynOn Mon, Sep 23, 2013 at 06:59:09AM +0000, Ed Avis wrote:
The other approach is to treat it similarly to how other non-string vars
The test suite for PerlIO::scalar already explicitly expects undef I've pushed the following, which fixes the original bug report by going commit 552908b PerlIO::scalar: stringify refs -- |
@iabyn - Status changed from 'open' to 'resolved' |
From @epaThanks for fixing this. If silently treating undef as the empty string really is the desired behaviour, -- ______________________________________________________________________ |
From @cpansproutOn Thu Oct 17 07:58:17 2013, davem wrote:
...which unfortunately breaks when reading a read-only ref in "<" mode. I pushed a better fix as 5a2bc23. I actually wrote something similar to that a month ago, but then sat on it as real life got in the way. The amazing thing was that both Dave Mitchell and I used \42 it our tests. Great minds think alike! -- Father Chrysostomos |
From @iabynOn Fri, Oct 25, 2013 at 02:23:10PM -0700, Father Chrysostomos via RT wrote:
Ok thanks.
Er, actually the \42 was in the sample code in the original ticket! -- |
Migrated from rt.perl.org#119529 (status was 'resolved')
Searchable as RT119529$
The text was updated successfully, but these errors were encountered: