[Python-bugs-list] [ python-Bugs-488184 ] import with undefineds can crash python

noreply@sourceforge.net noreply@sourceforge.net
Sat, 19 Oct 2002 13:12:16 -0700


Bugs item #488184, was opened at 2001-12-02 23:19
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=488184&group_id=5470

Category: Macintosh
Group: None
Status: Open
Resolution: None
>Priority: 1
Submitted By: Jack Jansen (jackjansen)
Assigned to: Jack Jansen (jackjansen)
Summary: import with undefineds can crash python

Initial Comment:
Importing a module which references undefined externals, or which references libraries that
fail initialization, can crash the interpreter.


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

>Comment By: Jack Jansen (jackjansen)
Date: 2002-10-19 22:12

Message:
Logged In: YES 
user_id=45365

This seems to have been fixed on OSX 10.2. The import of, say, Carbon.Win will now work fine. But: python will still exit (not crash, a clean exit) when you actually try to access the window manager if you don't have the right so I am keeping this bug open. I will try and find out if there's a way to detect this situation. 

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

Comment By: Jack Jansen (jackjansen)
Date: 2001-12-11 11:01

Message:
Logged In: YES 
user_id=45365

Apple was already aware of this bug, their bug number for it
is #2806458. There is no workaround known, so we'll have to
wait until it is fixed.

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

Comment By: Jack Jansen (jackjansen)
Date: 2001-12-06 23:56

Message:
Logged In: YES 
user_id=45365

Unfortunately the fix I had in mind, adding the "return on error" flag to NSLinkModule(), is not good enough. Python crashes while the initialization routine for the dynamic library is running, and NSLinkModule also never gets control back, it seems. I now think this is definitely an Apple bug. Lowering the priority because of that, not because it's not important.

I did find an easy way to reproduce the bug, though: "su" to someone else (not root, someone who can't access your window server) and import _Win or something similar.

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

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