develooper Front page | perl.perl5.porters | Postings from August 2018

Re: [perl #133477] perl 5 (v.5.26.1) interpreter crashes on 64-bitWindows

Thread Previous | Thread Next
Tomasz Konojacki
August 29, 2018 14:26
Re: [perl #133477] perl 5 (v.5.26.1) interpreter crashes on 64-bitWindows
Message ID:
On Sun, 26 Aug 2018 21:31:09 -0700
" via RT" <> wrote:

> The sample program crashes on x64 Strawberry Perl 5.26.0, but on x64 Strawberry Perl 5.28.0 it produces output of:
> Can't locate object method "parser" via package "#!perl" (perhaps you forgot to
> load "#!perl"?) at line 10, <INFILE> line 1.
> I believe that's the expected output - and therefore I would suggest that this bug has already been fixed.
> Cheers,
> Rob

The crash was caused by the fact that the name of the filehandle starts
with 'INF', change it to anything else, the code will stop crashing. 

While the code crashes only on Windows, it also behaves weirdly on other
platforms. For example, the following code executed with perl 5.26.2 on 
dragonfly or linux:

open INFILE, '<', \'foo';
while (<INFILE>) {
        warn 'bar';

outputs "bar at line 3, <INFILE> line 0.000000.". Note that the line
number is a float.

The following commit has fixed those problems:

commit 559a021f1d52c32a82cbdf9184aa59a58e898b08
Author: David Mitchell <>
Date:   Tue May 16 16:30:13 2017 +0100

    sprintf: handle sized int-ish formats with Inf/Nan
    The code path taken when int-ish formats saw an Inf/Nan was to jump to the
    floating-point handler, but then that would warn about (valid) size
    qualifiers. For example before:
        $ perl -we'printf "[%hi]\n", Inf'
        Invalid conversion in printf: "%hi" at -e line 1.
        Redundant argument in printf at -e line 1.
    After this commit:
        $ perl -we'printf "[%hi]\n", Inf'
    It also makes the code simpler.

However, the commit message doesn't say anything about crashing or float
line numbers, which makes me think that the fix was accidental.

I wonder if the bug was actually fixed or maybe it was just hidden. 

CC-ing Dave to get his opinion.

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