Bugs item #1176893, was opened at 2005-04-05 04:50 Message generated for change (Comment added) made by tim_one You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1176893&group_id=5470
Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: Walter Dörwald (doerwalter) >Assigned to: Mark Hammond (mhammond) Summary: Readline segfault Initial Comment: The latest change to the readline module has broken tab completion: ./python Python 2.5a0 (#1, Apr 5 2005, 01:14:33) [GCC 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import readline, rlcompleter [25913 refs] >>> readline.parse_and_bind("tab: complete") [25913 refs] >>> Segmentation fault [Press tab after the parse_and_bind() call] ---------------------------------------------------------------------- >Comment By: Tim Peters (tim_one) Date: 2005-04-07 11:15 Message: Logged In: YES user_id=31435 Sorry, can't make time for this. Reassigned to Mark in case he can. ---------------------------------------------------------------------- Comment By: Michael Hudson (mwh) Date: 2005-04-05 06:27 Message: Logged In: YES user_id=6656 Or maybe this one line patch is the answer (it certainly fixes this case). Tim, can you spare a minute to think about this? The patch simply adds a check to PyEval_ReleaseThread that doesn't call PyThread_release_lock if the GIL hasn't been allocated. ---------------------------------------------------------------------- Comment By: Michael Hudson (mwh) Date: 2005-04-05 06:18 Message: Logged In: YES user_id=6656 I'm going to go out on a limb and suggest this is a bug in the PyGilState_ functions. The problem burrows down to calling PyThread_release_lock(interpreter_lock) when interpreter_lock is NULL, i.e. PyEval_InitThreads hasn't been called. (if you start a thread before running the crashing code, it doesn't crash, because the GIL has been allocated). Not sure what the solution is, or who to bug (time to read cvs log, I guess). A silly workaround is to put PyEval_InitThreads in initreadline. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1176893&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com