This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rmtew
Recipients rmtew
Date 2011-08-25.05:21:48
SpamBayes Score 3.0439654e-07
Marked as misclassified No
Message-id <1314249709.71.0.494900056916.issue12839@psf.upfronthosting.co.za>
In-reply-to
Content
zlibmodule.c calling inflateInit2 and deflateInit2 will subsequently proceed to crash in the case where these functions return Z_VERSION_ERROR.

zlib implementation note:

When you compile against zlib, several functions (actually macros) like inflateInit2 and deflateInit2 compile the version of zlib you are compiling against into the actual call of the underlying real zlib API function.

Our situation:

We are compiling Python as a static library.  When we link Python against our main project,  it links against the version of zlib used by that main project.  The version numbers are different, and rather than getting a nice exception we get a crash.

Expected result:

Proper error handling in zlibmodule.c, and not crash.  Unhandled errors in zlibmodule.c are passed into the custom function zlib_error which looks at the msg field of the zst struct.  In the case of Z_VERSION_ERROR the msg field is not initialised and a crash will result from use of the nonsense value in msg.
History
Date User Action Args
2011-08-25 05:21:49rmtewsetrecipients: + rmtew
2011-08-25 05:21:49rmtewsetmessageid: <1314249709.71.0.494900056916.issue12839@psf.upfronthosting.co.za>
2011-08-25 05:21:49rmtewlinkissue12839 messages
2011-08-25 05:21:48rmtewcreate