[Python-bugs-list] [ python-Bugs-483982 ] Python 2.2b2 bdist_wininst crashes

noreply@sourceforge.net noreply@sourceforge.net
Mon, 17 Dec 2001 09:42:45 -0800


Bugs item #483982, was opened at 2001-11-20 15:39
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=483982&group_id=5470

>Category: Distutils
Group: None
Status: Open
Resolution: None
Priority: 7
Submitted By: Tarn Weisner Burton (twburton)
>Assigned to: Thomas Heller (theller)
Summary: Python 2.2b2 bdist_wininst crashes

Initial Comment:
The executable created by Python 2.2b2 bdist_wininst 
crashes on my system.  Python 2.1's version works fine.

This could just be my system and I can recompile the 
installer to test that, if that's needed, but after I 
looked into CVS I noted that it looks like wininst.exe 
has been checked in as a text file....hmmm

I've attached a minimal dist which exhibits to problem.

----------------------------------------------------------------------

>Comment By: Thomas Heller (theller)
Date: 2001-12-17 09:42

Message:
Logged In: YES 
user_id=11105

It seems all fields have to be updated after moving this...

----------------------------------------------------------------------

Comment By: Thomas Heller (theller)
Date: 2001-12-17 09:38

Message:
Logged In: YES 
user_id=11105

Moved from patches to bugs.

----------------------------------------------------------------------

Comment By: Thomas Heller (theller)
Date: 2001-12-17 09:31

Message:
Logged In: YES 
user_id=11105

Raised priority to 7 because this MUST be fixed before 
release (see PEP3).

----------------------------------------------------------------------

Comment By: Thomas Heller (theller)
Date: 2001-12-17 08:55

Message:
Logged In: YES 
user_id=11105

Tarn, good work!

I can now reproduce your problem here: It only appears when 
_no_ external zip.exe program is found somewhere on the 
PATH. In this case Python's zipfile.py is used, and this 
indeed creates an entry foo-1.0.win32.zip, leading to the 
crash.

This entry is not present when an zip.exe is used.

I will work on this.

----------------------------------------------------------------------

Comment By: Tarn Weisner Burton (twburton)
Date: 2001-12-10 07:37

Message:
Logged In: YES 
user_id=21784

This fails on the first file lookup.  I agree that it 
shouldn't but you can see the file that it is failing on 
by looking in the Python root.  In the case of a installer 
called "foo-1.0.win32-py2.2.exe" the first file appears to 
be "foo-1.0.win32.zip" which looks like the archive name.  
An empty file of this name also gets created by the 
installer.  I don't know if this is a normal part of a zip 
file.  If it is then adding

    if (n==0) continue;

before line 228 which is 

    pcomp = &data[pcdir->ofs_local_header

will fix it.

----------------------------------------------------------------------

Comment By: Thomas Heller (theller)
Date: 2001-12-10 02:29

Message:
Logged In: YES 
user_id=11105

Tarn, this is really a problem. Thanks for finding it.

I still wonder how this bug lead to a crash. Usually the 
for-loop doesn't run up to beyond the end of the list, 
because the prefix *should* always be found.

----------------------------------------------------------------------

Comment By: Tarn Weisner Burton (twburton)
Date: 2001-12-08 18:42

Message:
Logged In: YES 
user_id=21784

Looks like I've found the problem:

line 244 in misc/extract.c is currently this:

for (i = 0; *scheme[i].name; ++i) {

The scheme list is terminated by a NULL, so *NULL causes 
an exception at the end of the list.  Instead this should 
be:

for (i = 0; scheme[i].name; ++i) {



----------------------------------------------------------------------

Comment By: A.M. Kuchling (akuchling)
Date: 2001-12-06 12:55

Message:
Logged In: YES 
user_id=11375

Reassigning to Thomas Heller; I know nothing about 
bdist_wininst.


----------------------------------------------------------------------

Comment By: Tarn Weisner Burton (twburton)
Date: 2001-11-21 16:16

Message:
Logged In: YES 
user_id=21784

Looks like I put this under Patches instead of Bugs.  Sorry.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=483982&group_id=5470