[Zlib-devel] Fwd: zlib app crashes on release, not debug in Visual C++
John Bowler
jbowler at frontiernet.net
Tue Aug 3 12:05:23 EDT 2010
> From: Tilman Hausherr <tilman at snafu.de>
> I've built a mini console application with Visual C++ 6 that uses the
> zlib1.dll (1.2.5) http://zlib.net/zlib125-dll.zip that does nothing
> except calling zlibVersion(). It crashes in release mode with an
> access violation, but not in debug mode. I can run it in release mode
> if I enable the /debug linker flag.
I can confirm that I get the same behavior with Visual Studio 2010 (Pro).
Maybe this explains one of the problems I had with libpng, I was becoming
more and more suspicious that mixing runtime DLLs might not work. It seems
that there is a CRT specific entry point in the MicroSoft CRTs that must be
called after the DLL is loaded.
I'll try more debugging - the test program is attached (it works fine in
debug, but exits with 'Unhandled exception at 0x00905a4d in zlibtest.exe:
0xC0000005: Access violation.' in the release version.)
John Bowler <jbowler at acm.org>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: zlibtest.cpp
URL: <http://madler.net/pipermail/zlib-devel_madler.net/attachments/20100803/dbe9f0c7/attachment.ksh>
More information about the Zlib-devel
mailing list