Skip Menu |
Report information
Id: 131177
Status: open
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: RIVY [at] cpan.org
Roy.Ivy.III [at] gmail.com
Cc:
AdminCc:

Operating System: mswin32
PatchStatus: (no value)
Severity: medium
Type: core
Perl Version: 5.24.1
Fixed In: (no value)



CC: rivy [...] cpan.org
Date: Wed, 19 Apr 2017 12:08:21 -0500
From: Roy Ivy III <roy.ivy.iii [...] gmail.com>
Subject: MSWin32 (Win10) / qx{} bug for compound statments (eg, "echo 1 & echo 2")
To: perlbug [...] perl.org
Download (untitled) / with headers
text/plain 8.2k
Subject: MSWin32 (Win10) / qx{} bug for compound statments (eg, "echo 1 & echo 2")
Reply-To: rivy@cpan.org
Message-Id: <5.24.1_11732_1492620575@SP3-1>
From: rivy@cpan.org
To: perlbug@perl.org


This is a bug report for perl from rivy@cpan.org,
generated with the help of perlbug 1.40 running under perl 5.24.1.


-----------------------------------------------------------------
[Please describe your issue here]

`print qx{"echo 1 & echo 2"}` is incorrectly printing "1 & echo 2" for multiple versions of perl under Win10.

Notably, the bug is machine specific, occurring on one machine but not another, so it may a configuration problem. But, I don't see any configuration differences that should effect `perl` subshell execution. And I'm not sure where to look further.

Thanks for the attention.

Here is the relevant information & output:

```
C:\Users\Roy\Projects>ver

Microsoft Windows [Version 10.0.14393]

C:\Users\Roy\Projects>set comspec
ComSpec=C:\WINDOWS\system32\cmd.exe

C:\Users\Roy\Projects>perl -e "print qx{echo 1 & echo 2}"
1 & echo 2

C:\Users\Roy\Projects>cmd /x/d/c "echo 1 & echo 2"
1
2

C:\Users\Roy\Projects>perl -V
Summary of my perl5 (revision 5 version 24 subversion 1) configuration:

  Platform:
    osname=MSWin32, osvers=6.3, archname=MSWin32-x64-multi-thread
    uname='Win32 strawberry-perl 5.24.1.1 #1 Mon Jan 16 02:00:29 2017 x64'
    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 -DWIN64 -DCONSERVATIVE  -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=8, doublesize=8, byteorder=12345678, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, 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++.exe', ldflags ='-s -L"C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\perl\lib\CORE" -L"C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\c\lib"'
    libpth=C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\c\lib C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\c\x86_64-w64-mingw32\lib C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\c\lib\gcc\x86_64-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=libperl524.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=xs.dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-mdll -s -L"C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\perl\lib\CORE" -L"C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\c\lib"'


Characteristics of this binary (from libperl):
  Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
                        PERLIO_LAYERS PERL_COPY_ON_WRITE
                        PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
                        PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
                        PERL_MALLOC_WRAP 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
  Built under MSWin32
  Compiled at Jan 16 2017 02:12:13
  %ENV:
    PERL_CPAN_REPORTER_CONFIG="C:\Users\Roy\.CPANreporter\10-5.24.0\config.ini"
    PERL_CPAN_REPORTER_DIR="C:\Users\Roy\.CPANreporter\10-5.24.0"
    PERL_MB_OPTS="--color=always"
  @INC:
    C:/Users/Roy/AppData/Local/scoop/apps/perl/5.24.1.1/perl/site/lib
    C:/Users/Roy/AppData/Local/scoop/apps/perl/5.24.1.1/perl/vendor/lib
    C:/Users/Roy/AppData/Local/scoop/apps/perl/5.24.1.1/perl/lib
    .
```

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Site configuration information for perl 5.24.1:

Configured by strawberry-perl at Mon Jan 16 02:03:13 2017.

Summary of my perl5 (revision 5 version 24 subversion 1) configuration:
  
  Platform:
    osname=MSWin32, osvers=6.3, archname=MSWin32-x64-multi-thread
    uname='Win32 strawberry-perl 5.24.1.1 #1 Mon Jan 16 02:00:29 2017 x64'
    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 -DWIN64 -DCONSERVATIVE  -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=8, doublesize=8, byteorder=12345678, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, 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++.exe', ldflags ='-s -L"C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\perl\lib\CORE" -L"C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\c\lib"'
    libpth=C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\c\lib C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\c\x86_64-w64-mingw32\lib C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\c\lib\gcc\x86_64-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=libperl524.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=xs.dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-mdll -s -L"C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\perl\lib\CORE" -L"C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\c\lib"'


---
@INC for perl 5.24.1:
    C:/Users/Roy/AppData/Local/scoop/apps/perl/5.24.1.1/perl/site/lib
    C:/Users/Roy/AppData/Local/scoop/apps/perl/5.24.1.1/perl/vendor/lib
    C:/Users/Roy/AppData/Local/scoop/apps/perl/5.24.1.1/perl/lib

---
Environment for perl 5.24.1:
    CYGWIN=mintty
    HOME=C:\Users\Roy
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\Roy\OneDrive\Tools\#bin;C:\Users\Roy\OneDrive\Tools\#bin\lib;C:\Users\Roy\AppData\Local\scoop\shims;C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\perl\site\bin;C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\perl\bin;C:\Users\Roy\AppData\Local\scoop\apps\perl\5.24.1.1\c\bin;C:\Users\Roy\AppData\Local\scoop\apps\gcc\5.1.0-tdm\bin;C:\Users\Roy\appdata\local\scoop\apps\ant\1.9.6\bin;C:\Users\Roy\appdata\local\scoop\apps\openjdk\1.7.0-u60\bin;C:\Users\Roy\appdata\local\scoop\apps\go\1.5\bin;C:\Users\Roy\appdata\local\scoop\apps\ruby\2.2.1\bin;C:\Users\Roy\appdata\local\scoop\apps\python\3.5.1\scripts;C:\Users\Roy\Projects\perl\Code-Util\%USERPROFILE%\AppData\Local\Microsoft\WindowsApps
    PERL_BADLANG (unset)
    PERL_CPAN_REPORTER_CONFIG=C:\Users\Roy\.CPANreporter\10-5.24.0\config.ini
    PERL_CPAN_REPORTER_DIR=C:\Users\Roy\.CPANreporter\10-5.24.0
    PERL_MB_OPTS=--color=always
    SHELL (unset)



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