Skip to content
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

MSWin32 (Win10) / qx{} bug for compound statments (eg, "echo 1 & echo 2") #15957

Open
p5pRT opened this issue Apr 19, 2017 · 2 comments
Open

Comments

@p5pRT
Copy link

p5pRT commented Apr 19, 2017

Migrated from rt.perl.org#131177 (status was 'open')

Searchable as RT131177$

@p5pRT
Copy link
Author

p5pRT commented Apr 19, 2017

From Roy.Ivy.III@gmail.com

Created by rivy@cpan.org

`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
  .
```

Perl Info

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)

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2017

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

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

No branches or pull requests

2 participants