Web lists-archives.com

[Mingw-users] unzip error: zipfile probably corrupt (segmentation violation)






// Mingw32/msys version of Unzip unzips the file ok from the command 
line but not when called from in an app using "system(xx)" command
// Here is a program that demonstrates the problem

// Zip was originally downloaded from here..

//http://downloads.sourceforge.net/project/freertos/FreeRTOS/V8.2.3/\
FreeRTOSV8.2.3.zip
(// N.B. This behaviour also shows up with other large zip files)


#include <cstdlib>

// The app Works fine with GNUWin32 version of unzip
//const char* cmd = "C:/Gnuwin32/bin/unzip.exe \ 
C:/cpp/temp/FreeRTOSV8.2.3.zip -d C:/cpp/air_lib";

// but with Mingw/Msys version, during/after unzipping I get
// error:  zipfile probably corrupt (segmentation violation)
const char* cmd = "C:/MinGW/msys/1.0/bin/unzip.exe \ 
C:/cpp/temp/FreeRTOSV8.2.3.zip -d C:/cpp/air_lib";

int main()
{
    system (cmd);
}

---------- version info -----------
$ uname -a
MINGW32_NT-6.2 ANDYPC2 1.0.18(0.48/3/2) 2012-11-21 22:34 i686 Msys

_mingw.h

#define __MINGW32_VERSION           3021000L
#define __MINGW32_MAJOR_VERSION           3
#define __MINGW32_MINOR_VERSION          21
#define __MINGW32_PATCHLEVEL              0


$ ld -v
GNU ld (GNU Binutils) 2.25.1

$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-
wrapper.exe
Target: mingw32
Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 -
-build=m
ingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --
enable-lto
--enable-libssp --disable-multilib --enable-
languages=c,c++,fortran,objc,obj-c++
,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --
enable-l
ibstdcxx-debug --enable-version-specific-runtime-libs --with-
gmp=/usr/src/pkg/gm
p-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-
src/bld --
with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes -
-enable-
libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-
prefix=/
mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
Thread model: win32
gcc version 4.8.1 (GCC)


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe