develooper Front page | perl.perl5.porters | Postings from November 2012

[perl #115904] miniperl creates 8gb output under shell redirection

Thread Previous
From:
Christian Walde
Date:
November 24, 2012 20:43
Subject:
[perl #115904] miniperl creates 8gb output under shell redirection
Message ID:
rt-3.6.HEAD-17500-1353818594-345.115904-75-0@perl.org
# New Ticket Created by  "Christian Walde" 
# Please include the string:  [perl #115904]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=115904 >


This is a bug report for perl from walde.christian@googlemail.com,
generated with the help of perlbug 1.39 running under perl 5.12.4.


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

In any checkout with the following git commit id, or after
925798f29c677c612a63a08a92ebb5f169e27b02, the following commands
will cause a file containing 8GB of \o to be written:

  cd win32
  dmake .\config.h ..\git_version.h
  cd ..
  miniperl -e "open STDERR_COPY, '>&STDERR'; print 1;" 1>log 2>&1
  perl -e "print -s 'log'"

This is on Windows 7, using the MinGW included in
ActivePerl 5.12.4. I also tried with the MinGW included in the
latest Strawberry Perl, but that resulted only in compile errors.

Here's a full log of the broken behavior of miniperl:

  https://gist.github.com/4142366

Here's a full log of miniperl acting correctly:

  https://gist.github.com/4142377

The commit in question includes this line in the commit message:

  - Set lseeksize/lseektype to 4/long in new gc64* files
  (see f7e8b52a89)

The mentioned commit has this message, which seems to be
related to the problem:

  Change 25208 switched off USE_LARGE_FILES in win32/config_H.*
  but left LSEEKSIZE/Off_t_size and Off_t as 8 and __int64 (or
  long long) respectively. Similarly change 25215 switched off
  uselargefiles in win32/config.* but left lseeksize and
  lseektype as 8 and __int64 (or long long) respectively. Change
  25216 fixed the Borland settings in win32/config.bc on the
  basis that Borland should always be using 4 and long, but
  really all the other files should be using 4 and long for
  their default values as well to match the default values of
  USE_LARGE_FILES and uselargefiles. Having done that, we must
  then reverse the logic for fiddling with these values in
  win32/config_sh.PL: they are now changed to 8 and __int64 (or
  long long) if uselargefiles *is* defined (except for Borland,
  which always wants 4 and long).

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

Configured by gecko at Mon Jun 20 18:32:45 2011.

Summary of my perl5 (revision 5 version 12 subversion 4) configuration:

   Platform:
     osname=MSWin32, osvers=5.2, archname=MSWin32-x86-multi-thread
     uname=''
     config_args='undef'
     hint=recommended, useposix=true, d_sigaction=undef
     useithreads=define, usemultiplicity=define
     useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
     use64bitint=undef, use64bitall=undef, uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='C:/Perl/site/bin/gcc.exe', ccflags ='-DNDEBUG -DWIN32 -D_CONSOLE  
-DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT  
-DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -DPERL_MSVCRT_READFIX  
-DHASATTRIBUTE -fno-strict-aliasing -mms-bitfields',
     optimize='-O2',
     cppflags='-DWIN32'
     ccversion='', gccversion='3.4.5 (mingw-vista special r3)',  
gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
     d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64',  
lseeksize=8
     alignbytes=8, prototype=define
   Linker and Libraries:
     ld='C:\Perl\site\bin\g++.exe', ldflags ='-L"C:\Perl\lib\CORE"'
     libpth=\lib
     libs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32  
-lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm  
-lversion -lodbc32 -lodbccp32 -lcomctl32 -lmsvcrt
     perllibs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32  
-lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm  
-lversion -lodbc32 -lodbccp32 -lcomctl32 -lmsvcrt
     libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl512.lib
     gnulibc_version=''
   Dynamic Linking:
     dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
     cccdlflags=' ', lddlflags='-mdll -L"C:\Perl\lib\CORE"'

Locally applied patches:
     ACTIVEPERL_LOCAL_PATCHES_ENTRY
     c6fbf28 [perl #71806] perldb does not setup %dbline with the shebang  
option -d
     1fd8fa4 Add Wolfram Humann to AUTHORS
     f120055 make string-append on win32 100 times faster
     a2a8d15 Define _USE_32BIT_TIME_T for VC6 and VC7
     007cfe1 Don't pretend to support really old VC++ compilers
     6d8f7c9 Get rid of obsolete PerlCRT.dll support
     d956618 Make Term::ReadLine::findConsole fall back to STDIN if  
/dev/tty can't be opened
     321e50c Escape patch strings before embedding them in patchlevel.h

---
@INC for perl 5.12.4:
     C:/Perl/site/lib/MSWin32-x86-multi-thread
     C:/Perl/site/lib
     C:/Perl/lib
     .

---
Environment for perl 5.12.4:
     CYGWIN=nodosfilewarning
     HOME (unset)
     LANG=en_US.utf8
     LANGUAGE (unset)
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
     PATH=C:\Program Files (x86)\ActiveState Komodo IDE 7\;C:\Program Files  
(x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\PC  
Connectivity Solution\;C:\Perl64-16\site\bin;C:\Perl64-16\bin;C:\Program  
Files (x86)\ImageMagick-6.7.7-Q16;%CommonProgramFiles%\Microsoft  
Shared\Windows  
Live;C:\Perl\site\bin;C:\Perl\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program  
Files\Intel\WiFi\bin\;C:\Program Files\Common  
Files\Intel\WirelessCommon\;C:\Program Files\ThinkPad\Bluetooth  
Software\;C:\Program Files\ThinkPad\Bluetooth  
Software\syswow64;C:\SWTOOLS\ReadyApps;C:\Program Files  
(x86)\Lenovo\Access Connections\;c:\Program Files  
(x86)\PuTTY\;c:\cygwin\bin\;C:\Program Files  
(x86)\QuickTime\QTSystem\;C:\Program Files  
(x86)\Intel\Services\IPT\;C:\Program Files  
(x86)\GtkSharp\2.12\bin;d:\j\MeCab\bin\;c:\Python27\;c:\Python27\Scripts\;c:\Program  
Files (x86)\CMake  
2.8\bin\;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;C:\Program  
Files (x86)\Calibre2\;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program  
Files\TortoiseSVN\bin;C:\Program Files (x86)\Git\cmd;C:\Program  
Files\TortoiseGit\bin;C:\Ruby193\bin;C:\Program Files\Common  
Files\Microsoft Shared\Windows Live;C:\Program  
Files\Intel\WiFi\bin\;C:\Program Files\Common  
Files\Intel\WirelessCommon\;C:\Program Files (x86)\OpenVPN\bin;C:\Program  
Files\Mercurial
     PERL_BADLANG (unset)
     PERL_JSON_BACKEND=JSON::XS
     PERL_STRICTURES_EXTRA=1
     PERL_YAML_BACKEND=YAML::XS
     SHELL (unset)


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About