[issue12839] zlibmodule cannot handle Z_VERSION_ERROR zlib error

2011-09-04 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 2fb00b6ed17c by Nadeem Vawda in branch '3.2':
Issue #12839: Fix crash in zlib module due to version mismatch.
http://hg.python.org/cpython/rev/2fb00b6ed17c

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12839
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12839] zlibmodule cannot handle Z_VERSION_ERROR zlib error

2011-08-28 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset ba5000307b5d by Nadeem Vawda in branch '2.7':
Issue #12839: Fix crash in zlib module due to version mismatch.
http://hg.python.org/cpython/rev/ba5000307b5d

New changeset cc9e794bf94f by Nadeem Vawda in branch '3.2':
Issue #12839: Fix crash in zlib module due to version mismatch.
http://hg.python.org/cpython/rev/cc9e794bf94f

New changeset b384231df332 by Nadeem Vawda in branch 'default':
Merge: #12839: Fix crash in zlib module due to version mismatch.
http://hg.python.org/cpython/rev/b384231df332

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12839
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12839] zlibmodule cannot handle Z_VERSION_ERROR zlib error

2011-08-28 Thread Nadeem Vawda

Nadeem Vawda nadeem.va...@gmail.com added the comment:

Done. Once again, thanks for the report and the patch!

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12839
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12839] zlibmodule cannot handle Z_VERSION_ERROR zlib error

2011-08-25 Thread rmtew

rmtew richard.m@gmail.com added the comment:

Attached is a patch to fix the issue, generated using p4 diff -du which 
should hopefully be usable.

--
keywords: +patch
Added file: http://bugs.python.org/file23044/zlibmodule.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12839
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12839] zlibmodule cannot handle Z_VERSION_ERROR zlib error

2011-08-25 Thread Nadeem Vawda

Nadeem Vawda nadeem.va...@gmail.com added the comment:

Thanks for the bug report and patch. I'll take a look at it over the weekend.

--
assignee:  - nadeem.vawda
components: +Extension Modules -None
nosy: +nadeem.vawda

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12839
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12839] zlibmodule cannot handle Z_VERSION_ERROR zlib error

2011-08-24 Thread rmtew

New submission from rmtew richard.m@gmail.com:

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.

--
components: None
messages: 142954
nosy: rmtew
priority: normal
severity: normal
status: open
title: zlibmodule cannot handle Z_VERSION_ERROR zlib error
type: crash
versions: Python 2.7, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12839
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com