Bugs item #1503294, was opened at 2006-06-09 03:20 Message generated for change (Comment added) made by arigo You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1503294&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: Python Interpreter Core Group: Python 2.5 >Status: Closed >Resolution: Fixed Priority: 8 Submitted By: Brett Cannon (bcannon) Assigned to: Armin Rigo (arigo) Summary: -Wi causes a fatal Python error Initial Comment: PYTHONPATH=/Users/drifty/Code/Compiled/lib/python2.5 \ ./python.exe -Wi -tt /Users/drifty/Code/Compiled/lib/python2.5/compileall.py \ -d /Users/drifty/Code/Compiled/lib/python2.5 -f \ -x 'bad_coding|badsyntax|site-packages' /Users/drifty/Code/Compiled/lib/python2.5 Fatal Python error: PyThreadState_Get: no current thread make: *** [libinstall] Abort trap Works if I remove ``-Wi -tt`` from the command. ---------------------------------------------------------------------- >Comment By: Armin Rigo (arigo) Date: 2006-06-10 10:59 Message: Logged In: YES user_id=4771 Ah, PyThreadState_GET() complains if tstate is NULL, but only in debug mode. My code was prepared to handle a NULL return value; I didn't expect this extra check :-) Let's read _PyThreadState_Current directly then, as I don't see another way to get at it with no check. Checked in as r46818. Command-line arguments are not too much stressed by the test suite... ---------------------------------------------------------------------- Comment By: Brett Cannon (bcannon) Date: 2006-06-10 02:54 Message: Logged In: YES user_id=357491 Ah-ha! I checked svn blame on PyThreadState_Get() and PyThreadState_GET(), but not on PyDict_GetItem(). Assigning to Armin since he caused this ruckus. =) ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2006-06-10 02:19 Message: Logged In: YES user_id=31435 Removed "on OS X" from the Summary line, since this is trivial to reproduce on Windows too: $ python_d -Wi Fatal Python error: PyThreadState_Get: no current thread Note that I used a debug build there; the error doesn't occur if I use a release build instead. As a matter of fact, Armin recently added a comment to dictobject.c pointing out this very failure mode: /* We can arrive here with a NULL tstate during initialization: try running "python -Wi" for an example related to string interning. Let's just hope that no exception occurs then... */ For that matter, it could be that Armin _created_ this failure mode too ;-) ---------------------------------------------------------------------- Comment By: Brett Cannon (bcannon) Date: 2006-06-10 01:42 Message: Logged In: YES user_id=357491 OK, so -Wi is causing the failure. ---------------------------------------------------------------------- Comment By: Brett Cannon (bcannon) Date: 2006-06-09 16:59 Message: Logged In: YES user_id=357491 Forgot to try this with just one of the two flags; will do that soon. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1503294&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com