[Python-bugs-list] [ python-Bugs-544995 ] zlib crash on win32
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 17 Apr 2002 18:13:25 -0700
Bugs item #544995, was opened at 2002-04-17 14:17
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=544995&group_id=5470
Category: Python Library
>Group: Python 2.2.1 candidate
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew Bennetts (spiv)
Assigned to: Nobody/Anonymous (nobody)
Summary: zlib crash on win32
Initial Comment:
On Win2k:
>>> import zlib
>>> c = zlib.compressobj()
>>> c.flush()
'x\x9c\x03\x00\x00\x00\x00\x01'
>>> c.flush() # This crashes.
This occurs both from the command line and from IDLE.
I cannot reproduce this on Linux (it just raises a
zlib.error, as you would expect).
----------------------------------------------------------------------
>Comment By: Andrew Bennetts (spiv)
Date: 2002-04-18 11:13
Message:
Logged In: YES
user_id=50945
Tim, I'm using Debian's 1.1.4 on Linux, but Linux is working
fine (perhaps you misread my bug report, which was rather
terse?). The example I gave segfaults on Windows 2000. It
should instead raise a zlib.error, which it does on Linux.
The docs say that you cannot do anything useful with a
compressobj opened in mode Z_FINISH (the default) after
calling flush, so the zlib.error is expected.
I can't test Mark's patch, but at a glance it looks good.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2002-04-18 11:07
Message:
Logged In: YES
user_id=31435
Mark, looks good to me, but I'd really like to see someone
on Linux dig into this too. Is this an ancient bug that
just never surfaced before? Or does it have something to
do with moving to zlib 1.1.4 on Windows?
----------------------------------------------------------------------
Comment By: Mark Hammond (mhammond)
Date: 2002-04-17 16:56
Message:
Logged In: YES
user_id=14198
Crashes for me too. Attaching patch to zlibmodule, and
addition to test suite that demonstrates the crash.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2002-04-17 14:43
Message:
Logged In: YES
user_id=31435
Andrew, which version of zlib were you using on Linux?
Windows ships with zlib 1.1.4, which is a very recent
release produced by the zlib folks to plug a zlib security
hole. On Linux we don't ship any version of zlib, so you
get whatever zlib happens to be sitting on your box. If
you haven't done something to upgrade your Linux zlib
version, you probably have 1.1.3. Can you check? (And no,
sorry, I don't know how you can check -- but since you're
closer to your box than I am, you've got a better shot than
I do <wink>).
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=544995&group_id=5470