[ python-Bugs-1176893 ] Readline segfault

SourceForge.net noreply at sourceforge.net
Tue Apr 5 12:18:05 CEST 2005


Bugs item #1176893, was opened at 2005-04-05 09:50
Message generated for change (Comment added) made by mwh
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: Michael Hudson (mwh)
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: Michael Hudson (mwh)
Date: 2005-04-05 11: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


More information about the Python-bugs-list mailing list