Skip to content

Bleadperl breaks TODDR/IPC-Run-0.94.tar.gz on Windows #14728

Closed

Description

@p5pRT

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

Searchable as RT125303$

Activity

  1. p5pRT commented on Jun 1, 2015

    @p5pRT
    Author

    From @chorny

    This test passes with same versions of Socket and Win32API​::File on 5.20.2.

    t/pump.t
    1..27
    ok 1
    ok 2
    ok 3
    ok 4
    ok 5
    ok 6
    ok 7
    ok 8
    ok 9
    Invalid argument opening STDIN as Win32 handle 1916 in pumper 1456 at
    C​:\Strawberry220\cpan\build\IPC-Run-0.94-j7a7Sn\blib\lib/IPC/Run/Win32Pump.pm
    line 71.
    Compilation failed in require.
    BEGIN failed--compilation aborted.
    Invalid argument opening STDIN as Win32 handle 1820 in pumper 448 at
    C​:\Strawberry220\cpan\build\IPC-Run-0.94-j7a7Sn\blib\lib/IPC/Run/Win32Pump.pm
    line 71.
    Compilation failed in require.
    BEGIN failed--compilation aborted.
    ack Invalid argument​: read( 9 ) at
    C​:\Strawberry220\cpan\build\IPC-Run-0.94-j7a7Sn\blib\lib/IPC/Run/IO.pm
    line 558.
    # Looks like you planned 27 tests but ran 9.
    # Looks like your test exited with 22 just after 9.
    Warning​: unable to close filehandle GEN5 properly​: Bad file descriptor
    during global destruction.

    $^E for "Invalid argument" is "The handle is invalid".

    You can get Strawberry 5.22.0RC2 here http​://strawberryperl.com/beta.html

    https://rt.cpan.org/Ticket/Display.html?id=104812
    http​://www.cpantesters.org/cpan/report/edd415e1-6bf3-1014-a359-969a038ec9dd

    perl -V (also tested gcc 4.8.3)​:
    Summary of my perl5 (revision 5 version 22 subversion 0) configuration​:

      Platform​:
      osname=MSWin32, osvers=6.3, archname=MSWin32-x86-multi-thread-64int
      uname='Win32 strawberry-perl 5.22.0.1-beta3 #1 Fri May 22 10​:13​:04
    2015 i386'
      config_args='undef'
      hint=recommended, useposix=true, d_sigaction=undef
      useithreads=define, usemultiplicity=define
      use64bitint=define, use64bitall=undef, uselongdouble=undef
      usemymalloc=n, bincompat5005=undef
      Compiler​:
      cc='gcc', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS
    -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv
    -fno-strict-aliasing -mms-bitfields',
      optimize='-s -O2',
      cppflags='-DWIN32'
      ccversion='', gccversion='4.9.2', gccosandvers=''
      intsize=4, longsize=4, ptrsize=4, doublesize=8,
    byteorder=12345678, doublekind=3
      d_longlong=define, longlongsize=8, d_longdbl=define,
    longdblsize=8, longdblkind=3
      ivtype='long long', ivsize=8, nvtype='double', nvsize=8,
    Off_t='long long', lseeksize=8
      alignbytes=8, prototype=define
      Linker and Libraries​:
      ld='g++', ldflags ='-s -L"C​:\STRAWB1\perl\lib\CORE" -L"C​:\STRAWB1\c\lib"'
      libpth=C​:\STRAWB1\c\lib C​:\STRAWB1\c\i686-w64-mingw32\lib
    C​:\STRAWB1\c\lib\gcc\i686-w64-mingw32\4.9.2
      libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32
    -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32
    -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
      perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool
    -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid
    -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
      libc=, so=dll, useshrplib=true, libperl=libperl522.a
      gnulibc_version=''
      Dynamic Linking​:
      dlsrc=dl_win32.xs, dlext=xs.dll, d_dlsymun=undef, ccdlflags=' '
      cccdlflags=' ', lddlflags='-mdll -s -L"C​:\STRAWB
    1\perl\lib\CORE"
    -L"C​:\STRAWB~1\c\lib"'

    Characteristics of this binary (from libperl)​:
      Compile-time options​: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
      PERLIO_LAYERS PERL_DONT_CREATE_GVSV
      PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
      PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
      PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE
      PERL_PRESERVE_IVUV USE_64_BIT_INT USE_ITHREADS
      USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
      USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME
      USE_PERLIO USE_PERL_ATOF
      Locally applied patches​:
      RC2
      Built under MSWin32
      Compiled at May 22 2015 10​:18​:10
      %ENV​:
      PERL_HASH_SEED="0x11111111"
      @​INC​:
      C​:/Strawberry220/perl/site/lib
      C​:/Strawberry220/perl/vendor/lib
      C​:/Strawberry220/perl/lib
      .

    --
    Alexandr Ciornii, http​://chorny.net

  2. p5pRT commented on Aug 2, 2015

    @p5pRT
    Author

    From @jkeenan

    On Mon Jun 01 10​:09​:19 2015, chorny wrote​:

    This test passes with same versions of Socket and Win32API​::File on
    5.20.2.

    t/pump.t
    1..27
    ok 1
    ok 2
    ok 3
    ok 4
    ok 5
    ok 6
    ok 7
    ok 8
    ok 9
    Invalid argument opening STDIN as Win32 handle 1916 in pumper 1456 at
    C​:\Strawberry220\cpan\build\IPC-Run-0.94-
    j7a7Sn\blib\lib/IPC/Run/Win32Pump.pm
    line 71.
    Compilation failed in require.
    BEGIN failed--compilation aborted.
    Invalid argument opening STDIN as Win32 handle 1820 in pumper 448 at
    C​:\Strawberry220\cpan\build\IPC-Run-0.94-
    j7a7Sn\blib\lib/IPC/Run/Win32Pump.pm
    line 71.
    Compilation failed in require.
    BEGIN failed--compilation aborted.
    ack Invalid argument​: read( 9 ) at
    C​:\Strawberry220\cpan\build\IPC-Run-0.94-j7a7Sn\blib\lib/IPC/Run/IO.pm
    line 558.
    # Looks like you planned 27 tests but ran 9.
    # Looks like your test exited with 22 just after 9.
    Warning​: unable to close filehandle GEN5 properly​: Bad file descriptor
    during global destruction.

    $^E for "Invalid argument" is "The handle is invalid".

    You can get Strawberry 5.22.0RC2 here
    http​://strawberryperl.com/beta.html

    https://rt.cpan.org/Ticket/Display.html?id=104812
    http​://www.cpantesters.org/cpan/report/edd415e1-6bf3-1014-a359-
    969a038ec9dd

    perl -V (also tested gcc 4.8.3)​:
    Summary of my perl5 (revision 5 version 22 subversion 0)
    configuration​:

    Platform​:
    osname=MSWin32, osvers=6.3, archname=MSWin32-x86-multi-thread-64int
    uname='Win32 strawberry-perl 5.22.0.1-beta3 #1 Fri May 22 10​:13​:04
    2015 i386'
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    Compiler​:
    cc='gcc', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS

    [snip]

    Is there anyone running Strawberry Perl who could perform a git bisect on this?

    Thank you very much.

    --
    James E Keenan (jkeenan@​cpan.org)

  3. p5pRT commented on Aug 2, 2015

    @p5pRT
    Author

    The RT System itself - Status changed from 'new' to 'open'

  4. p5pRT commented on Aug 4, 2015

    @p5pRT
    Author

    From @toddr

    On Aug 1, 2015, at 7​:22 PM, James E Keenan via RT <perlbug-followup@​perl.org> wrote​:

    On Mon Jun 01 10​:09​:19 2015, chorny wrote​:
    This test passes with same versions of Socket and Win32API​::File on
    5.20.2.

    t/pump.t
    1..27
    ok 1
    ok 2
    ok 3
    ok 4
    ok 5
    ok 6
    ok 7
    ok 8
    ok 9
    Invalid argument opening STDIN as Win32 handle 1916 in pumper 1456 at
    C​:\Strawberry220\cpan\build\IPC-Run-0.94-
    j7a7Sn\blib\lib/IPC/Run/Win32Pump.pm
    line 71.
    Compilation failed in require.
    BEGIN failed--compilation aborted.
    Invalid argument opening STDIN as Win32 handle 1820 in pumper 448 at
    C​:\Strawberry220\cpan\build\IPC-Run-0.94-
    j7a7Sn\blib\lib/IPC/Run/Win32Pump.pm
    line 71.
    Compilation failed in require.
    BEGIN failed--compilation aborted.
    ack Invalid argument​: read( 9 ) at
    C​:\Strawberry220\cpan\build\IPC-Run-0.94-j7a7Sn\blib\lib/IPC/Run/IO.pm
    line 558.
    # Looks like you planned 27 tests but ran 9.
    # Looks like your test exited with 22 just after 9.
    Warning​: unable to close filehandle GEN5 properly​: Bad file descriptor
    during global destruction.

    $^E for "Invalid argument" is "The handle is invalid".

    You can get Strawberry 5.22.0RC2 here
    http​://strawberryperl.com/beta.html

    https://rt.cpan.org/Ticket/Display.html?id=104812
    http​://www.cpantesters.org/cpan/report/edd415e1-6bf3-1014-a359-
    969a038ec9dd

    perl -V (also tested gcc 4.8.3)​:
    Summary of my perl5 (revision 5 version 22 subversion 0)
    configuration​:

    Platform​:
    osname=MSWin32, osvers=6.3, archname=MSWin32-x86-multi-thread-64int
    uname='Win32 strawberry-perl 5.22.0.1-beta3 #1 Fri May 22 10​:13​:04
    2015 i386'
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    Compiler​:
    cc='gcc', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS

    [snip]

    Is there anyone running Strawberry Perl who could perform a git bisect on this?

    Also adopters welcome!

  5. p5pRT commented on Feb 23, 2016

    @p5pRT
    Author

    From @tonycoz

    On Mon Jun 01 10​:09​:19 2015, chorny wrote​:

    This test passes with same versions of Socket and Win32API​::File on
    5.20.2.

    t/pump.t
    1..27
    ok 1
    ok 2
    ok 3
    ok 4
    ok 5
    ok 6
    ok 7
    ok 8
    ok 9
    Invalid argument opening STDIN as Win32 handle 1916 in pumper 1456 at
    C​:\Strawberry220\cpan\build\IPC-Run-0.94-
    j7a7Sn\blib\lib/IPC/Run/Win32Pump.pm
    line 71.

    Bisected down to

    22ff313 is the first bad commit
    commit 22ff313
    Author​: Hugo van der Sanden <hv@​crypt.org>
    Date​: Mon Feb 23 16​:48​:15 2015 +0000

      [perl #123814] replace grok_atou with grok_atoUV

      Some questions and loose ends​:

      XXX gv.c​:S_gv_magicalize - why are we using SSize_t for paren?
      XXX mg.c​:Perl_magic_set - need appopriate error handling for $)
      XXX regcomp.c​:S_reg - need to check if we do the right thing if parno
      was not grokked

      Perl_get_debug_opts should probably return something unsigned; not sure
      if that's something we can change.

    though nothing in that commit leaps out at me as the cause.

    Warning​: unable to close filehandle GEN5 properly​: Bad file descriptor
    during global destruction.

    This warning occurs before and after the commit above.

    Tony

  6. p5pRT commented on Feb 24, 2016

    @p5pRT
    Author

    From @tonycoz

    On Tue Feb 23 14​:51​:15 2016, tonyc wrote​:

    commit 22ff313
    Author​: Hugo van der Sanden <hv@​crypt.org>
    Date​: Mon Feb 23 16​:48​:15 2015 +0000

    ...

    though nothing in that commit leaps out at me as the cause.

    This is it​:

    Inline Patch
    diff --git a/doio.c b/doio.c
    index a63f2a2..218887d 100644
    --- a/doio.c
    +++ b/doio.c
    @@ -377,6 +377,7 @@ Perl_do_open6(pTHX_ GV *gv, const char *oname, STRLEN len,
                    else {
                        PerlIO *that_fp = NULL;
                         int wanted_fd;
    +                    UV uv;
                        if (num_svs > 1) {
                            /* diag_listed_as: More than one argument to '%s' open */
                            Perl_croak(aTHX_ "More than one argument to '%c&' open",IoTYPE(io));
    @@ -390,8 +391,11 @@ Perl_do_open6(pTHX_ GV *gv, const char *oname, STRLEN len,
                             wanted_fd = SvUV(*svp);
                            num_svs = 0;
                        }
    -                   else if (isDIGIT(*type)) {
    -                        wanted_fd = grok_atou(type, NULL);
    +                   else if (isDIGIT(*type)
    +                        && grok_atoUV(type, &uv, NULL)
    +                        && uv <= INT_MAX
    +                    ) {
    +                        wanted_fd = (int)uv;
                        }
                        else {
                            const IO* thatio;
    
    
    OsFHandleOpen() in Win32API::File includes code:

      $mode |= O_BINARY if $access =~ /b/i;
      my $fd = eval { OsFHandleOpenFd( $osfh, $mode ) };
      if ($@​) {
      return tie *{$fh}, __PACKAGE__, $osfh;
      }
      return undef if $fd < 0;
      return open( $fh, $pref."&=".$fd );

    OsFHandleOpenFd() can return three types of results​:

    - a "no" or false value on failure (note the bad error checking above)
    - a positive integer (that's fine), or
    - "0 but true" when the fd is 0

    So for the case in IPC​::Run, the open becomes​:

      open( $fh, "<&=0 but true" );

    which the updated do_open6() rejects.

    You might be thinking that perhaps the previous behaviour was preferable, but the previous behaviour was that​:

      open( $fh, "<&=123 but true" );

    was treated as​:

      open( $fh, "<&=0" );

    which is badly broken.

    I've opened a PR against Win32API​::File"

    chorny/Win32API-File#6

    Tony

  7. p5pRT commented on Mar 18, 2016

    @p5pRT
    Author

    From @hvds

    On Tue Feb 23 16​:46​:27 2016, tonyc wrote​:

    I've opened a PR against Win32API​::File"

    chorny/Win32API-File#6

    Looks like this was included in Win32API-File-0.1203. Does that pass now, can this ticket be closed?

    Hugo

  8. p5pRT commented on Mar 18, 2016

    @p5pRT
    Author

    From @steve-m-hay

    On 18 March 2016 at 09​:00, Hugo van der Sanden via RT
    <perlbug-followup@​perl.org> wrote​:

    On Tue Feb 23 16​:46​:27 2016, tonyc wrote​:

    I've opened a PR against Win32API​::File"

    chorny/Win32API-File#6

    Looks like this was included in Win32API-File-0.1203. Does that pass now, can this ticket be closed?

    Win32API-File is in core. I've upgraded to 0.1203 in my local blead
    and have tests running in the background now. I will push the change
    and close the ticket if all is well.

  9. p5pRT commented on Mar 19, 2016

    @p5pRT
    Author

    From @steve-m-hay

    On Fri Mar 18 02​:08​:02 2016, shay wrote​:

    On 18 March 2016 at 09​:00, Hugo van der Sanden via RT
    <perlbug-followup@​perl.org> wrote​:

    On Tue Feb 23 16​:46​:27 2016, tonyc wrote​:

    I've opened a PR against Win32API​::File"

    chorny/Win32API-File#6

    Looks like this was included in Win32API-File-0.1203. Does that pass
    now, can this ticket be closed?

    Win32API-File is in core. I've upgraded to 0.1203 in my local blead
    and have tests running in the background now. I will push the change
    and close the ticket if all is well.

    Now applied in commit df61f5a.

  10. p5pRT commented on Mar 19, 2016

    @p5pRT
    Author

    @steve-m-hay - Status changed from 'open' to 'pending release'

  11. p5pRT commented on May 13, 2016

    @p5pRT
    Author

    From @khwilliamson

    Thank you for submitting this report. You have helped make Perl better.
     
    With the release of Perl 5.24.0 on May 9, 2016, this and 149 other issues have been resolved.

    Perl 5.24.0 may be downloaded via https://metacpan.org/release/RJBS/perl-5.24.0

  12. p5pRT commented on May 13, 2016

    @p5pRT
    Author

    @khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions