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

Owner: Nobody
Requestors: chorny <alexchorny [at] gmail.com>
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: (no value)
Severity: low
Type: unknown
Perl Version: (no value)
Fixed In: (no value)



Date: Mon, 1 Jun 2015 20:08:19 +0300
Subject: Bleadperl breaks TODDR/IPC-Run-0.94.tar.gz on Windows
From: Alexandr Ciornii <alexchorny [...] gmail.com>
To: perlbug [...] perl.org
Download (untitled) / with headers
text/plain 3.9k
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:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib"' libpth=C:\STRAWB~1\c\lib C:\STRAWB~1\c\i686-w64-mingw32\lib C:\STRAWB~1\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
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.9k
On Mon Jun 01 10:09:19 2015, chorny wrote: Show quoted text
> 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)
From: Todd E Rinaldo <toddr [...] cpanel.net>
Subject: Re: [perl #125303] Bleadperl breaks TODDR/IPC-Run-0.94.tar.gz on Windows
CC: "perl5-porters [...] perl.org" <perl5-porters [...] perl.org>
To: "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
Date: Tue, 4 Aug 2015 09:36:09 -0500
Download (untitled) / with headers
text/plain 2.1k
Show quoted text
> 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!
Download smime.p7s
application/pkcs7-signature 4.5k

Message body not shown because it is not plain text.

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.2k
On Mon Jun 01 10:09:19 2015, chorny wrote: Show quoted text
> 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 22ff313068aa37b1a24855e760e71ee9a20a1a90 is the first bad commit commit 22ff313068aa37b1a24855e760e71ee9a20a1a90 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. Show quoted text
> Warning: unable to close filehandle GEN5 properly: Bad file descriptor > during global destruction.
This warning occurs before and after the commit above. Tony
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 2.2k
On Tue Feb 23 14:51:15 2016, tonyc wrote: Show quoted text
> commit 22ff313068aa37b1a24855e760e71ee9a20a1a90 > Author: Hugo van der Sanden <hv@crypt.org> > Date: Mon Feb 23 16:48:15 2015 +0000 >
... Show quoted text
> > though nothing in that commit leaps out at me as the cause.
This is it: 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" https://github.com/chorny/Win32API-File/pull/6 Tony
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 244b
On Tue Feb 23 16:46:27 2016, tonyc wrote: Show quoted text
> I've opened a PR against Win32API::File" > > https://github.com/chorny/Win32API-File/pull/6
Looks like this was included in Win32API-File-0.1203. Does that pass now, can this ticket be closed? Hugo
Subject: Re: [perl #125303] Bleadperl breaks TODDR/IPC-Run-0.94.tar.gz on Windows
Date: Fri, 18 Mar 2016 09:07:34 +0000
To: bulk88 via RT <perlbug-followup [...] perl.org>
From: Steve Hay via perl5-porters <perl5-porters [...] perl.org>
CC: "perl5-porters [...] perl.org" <perl5-porters [...] perl.org>
Download (untitled) / with headers
text/plain 513b
On 18 March 2016 at 09:00, Hugo van der Sanden via RT <perlbug-followup@perl.org> wrote: Show quoted text
> On Tue Feb 23 16:46:27 2016, tonyc wrote:
>> I've opened a PR against Win32API::File" >> >> https://github.com/chorny/Win32API-File/pull/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.
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 647b
On Fri Mar 18 02:08:02 2016, shay wrote: Show quoted text
> 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" > >> > >> https://github.com/chorny/Win32API-File/pull/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 df61f5a9a27706fb7cd2b7bb1ab932ee8142f511.
Download (untitled) / with headers
text/plain 252b
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


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