[ python-Bugs-1166660 ] The readline module can cause python to
segfault
SourceForge.net
noreply at sourceforge.net
Tue Mar 29 00:33:54 CEST 2005
Bugs item #1166660, was opened at 2005-03-19 23:48
Message generated for change (Comment added) made by dcoder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1166660&group_id=5470
Category: Threads
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Yariv Ido (dcoder)
Assigned to: Michael Hudson (mwh)
Summary: The readline module can cause python to segfault
Initial Comment:
When starting an interactive interpreter in another
thread, with readline's completion functionality, there
exists a race condition which causes the Python
interpreter to segfault. There's a small discussion
about this bug at
<http://www.scipy.net/roundup/ipython/issue30>.
Attached is a small proof-of-concept code. Please note
that some people couldn't reproduce this on slower
machines. I've managed to reproduce it on several Linux
systems (Dual Xeon computers), using Python 2.3.4, 2.4
and 2.4.1c2.
Thanks in advance.
----------------------------------------------------------------------
>Comment By: Yariv Ido (dcoder)
Date: 2005-03-29 00:33
Message:
Logged In: YES
user_id=326689
I haven't (Completely forgot about it, after finding the
main one...). Should I post a seperate bug report, or will
this one do?
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2005-03-27 22:43
Message:
Logged In: YES
user_id=6656
I'll take a look at this.
Did you submit a bug on the set_startup_hook problem mentioned in the
ipython tracker?
----------------------------------------------------------------------
Comment By: Yariv Ido (dcoder)
Date: 2005-03-20 01:59
Message:
Logged In: YES
user_id=326689
I may be completely off track here, but shouldn't
on_completion(...) (readline.c) use _PyOS_ReadlineTState
instead of completer_tstate to restore the GIL?
Also, in readline_until_enter_or_signal(...), shouldn't
PyEval_SaveThread()'s return value be saved back to
_PyOS_ReadlineTState?
It seems that these patches manage to fix the above
segmentation fault...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1166660&group_id=5470
More information about the Python-bugs-list
mailing list