Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#9211 - Python readline segfault

Attached to Project: Arch Linux
Opened by dx (dx) - Monday, 14 January 2008, 19:21 GMT
Last edited by Jan de Groot (JGC) - Monday, 14 January 2008, 21:04 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity Medium
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Python's readline segfaults always after pressing the ESC key three times. This applies to all raw_input() calls when the readline module is imported (I enable tab completition with a $PYTHONSTARTUP script). Side note, "raw_input()" is a function to get keyboard input, while "input()" is a function to evaluate commands! That will change in py3k, but right now the name doesn't describe its functionality.

Tested in GNU Screen on xfce terminal, clean xterm, clean tty. Other "readlines" i've tested, bash and gdb, don't segfault


$ gdb python
GNU gdb 6.7.1
...
This GDB was configured as "i686-pc-linux-gnu"...
...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run -c 'import readline; raw_input()'
Starting program: /usr/bin/python -c 'import readline; raw_input()'
(no debugging symbols found)
...
[Thread debugging using libthread_db enabled]
...
[New Thread 0xb7cfd6c0 (LWP 8849)]
...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7cfd6c0 (LWP 8849)]
0xb7af2791 in rl_callback_read_char () from /lib/libreadline.so.5
(gdb) bt
#0 0xb7af2791 in rl_callback_read_char () from /lib/libreadline.so.5
#1 0xb7b048b5 in call_readline ()
from /usr/lib/python2.5/lib-dynload/readline.so
#2 0xb7e9d068 in PyOS_Readline () from /usr/lib/libpython2.5.so.1.0
#3 0xb7f17ecb in builtin_raw_input () from /usr/lib/libpython2.5.so.1.0
#4 0xb7ed538a in PyCFunction_Call () from /usr/lib/libpython2.5.so.1.0
#5 0xb7f22c5c in PyEval_EvalFrameEx () from /usr/lib/libpython2.5.so.1.0
#6 0xb7f240fb in PyEval_EvalCodeEx () from /usr/lib/libpython2.5.so.1.0
#7 0xb7f24253 in PyEval_EvalCode () from /usr/lib/libpython2.5.so.1.0
#8 0xb7f44a5c in PyRun_StringFlags () from /usr/lib/libpython2.5.so.1.0
#9 0xb7f45d03 in PyRun_SimpleStringFlags () from /usr/lib/libpython2.5.so.1.0
#10 0xb7f50385 in Py_Main () from /usr/lib/libpython2.5.so.1.0
#11 0x080485f2 in main ()



Additional info:
python 2.5.1-3
readline 5.2-6


Steps to reproduce:
1. python -c 'import readline; raw_input()'
2. Three times ESC

Without the "import readline" it just displays control codes.
This task depends upon

Closed by  Jan de Groot (JGC)
Monday, 14 January 2008, 21:04 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with readline-5.2-7 from testing.
Comment by Jan de Groot (JGC) - Monday, 14 January 2008, 20:36 GMT
Can't reproduce this on amd64, so it's i686 only. I can reproduce it on i686.

Loading...