Patches item #922167, was opened at 2004-03-24 04:17 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=922167&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core (C code) Group: Python 2.5 Status: Open Resolution: Accepted Priority: 5 Private: No Submitted By: Brian Leair (bleair2) Assigned to: Collin Winter (collinwinter) Summary: Patch to 742342 Crash on recursive reload Initial Comment: Modules that causes a recursive reload cause a program abort. Easy for python developer to fix in their code, but the python interpreter shouldn't crash. This patch guards against circular reloading. This protection comes by an additional dictionary stored in the interpreter state to keep trakc of modules that are reloading. Recursive imports are protected against in a similar manner ---------------------------------------------------------------------- >Comment By: Georg Brandl (gbrandl) Date: 2007-03-12 12:53 Message: Logged In: YES user_id=849994 Originator: NO With a file "foo.py" containing "import foo; reload(foo)", the interpreter segfaults here (linux x86). With the patch, it doesn't anymore. ---------------------------------------------------------------------- Comment By: Martin v. Löwis (loewis) Date: 2007-03-12 12:21 Message: Logged In: YES user_id=21627 Originator: NO The failure I see is not an interpreter crash, but an ImportError. Is that what everybody else sees also, or does it really fault the interpreter? If that is the bug to be fixed, the patch looks fine, please apply. There is one line that uses space rather than tab; that should be corrected before committing. ---------------------------------------------------------------------- Comment By: Collin Winter (collinwinter) Date: 2007-03-12 00:24 Message: Logged In: YES user_id=1344176 Originator: NO I've updated this patch to a recent SVN revision and worked up a test case. What do you think, Martin? File Added: reload.patch ---------------------------------------------------------------------- Comment By: Martin v. Löwis (loewis) Date: 2007-03-06 14:53 Message: Logged In: YES user_id=21627 Originator: NO Can you please also provide a test suite change to demonstrate the problem? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=922167&group_id=5470 _______________________________________________ Patches mailing list Patches@python.org http://mail.python.org/mailman/listinfo/patches