[Python-bugs-list] [ python-Bugs-728511 ] Opening a nonexistent tar file in mode r:bz2 seg faults
SourceForge.net
noreply@sourceforge.net
Sun, 27 Apr 2003 16:27:05 -0700
Bugs item #728511, was opened at 2003-04-27 12:37
Message generated for change (Comment added) made by logistix
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=728511&group_id=5470
Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Gary Herron (herron)
Assigned to: Nobody/Anonymous (nobody)
Summary: Opening a nonexistent tar file in mode r:bz2 seg faults
Initial Comment:
Running Python 2.3 beta 1 on a Linux (RH9) system, I get a
segmentation fault when I mistakenly open a nonexistent
file in mode
"r:bz2".
>>> import tarfile
>>> tar = tarfile.open("non-existent-file", "r:bz2")
Segmentation fault
If the mode is "r:gz" then the result is (properly)
No such file ...
And, of course, all is fine if the file *does* exist.
----------------------------------------------------------------------
Comment By: logistix (logistix)
Date: 2003-04-27 18:27
Message:
Logged In: YES
user_id=699438
bz2module's cleanup code used a Py_DECREF when it
should've used an Py_XDECREF.
Patch 728656 posted.
Error now replies "Read Error: not a bzip2 file"
----------------------------------------------------------------------
Comment By: Gary Herron (herron)
Date: 2003-04-27 13:21
Message:
Logged In: YES
user_id=395736
Similarily on windows, with the same code, on gets an
Application Error popup with the message
The instruction at "..." referenced memory at "0x00000000". ...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=728511&group_id=5470