[Bug 230030] Re: php segfaults with readline
iblue
iblue at gmx.net
Mon Nov 14 21:28:09 UTC 2011
Update: The bug ist still present in 11.10, 3.5 years after I reported
it. You still need to press [TAB] twice to make it crash. If you would
link against libreadline instead of libedit, this bug would vanish.
iblue at nerdpol:/tmp$ lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10
iblue at nerdpol:/tmp$ php -v
PHP 5.3.6-13ubuntu3.2 with Suhosin-Patch (cli) (built: Oct 13 2011 23:19:13)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
iblue at nerdpol:/tmp$ cat bug.php
<?php
function foo($part, $position) {
return array();
}
readline_completion_function("foo");
$line = readline("Command: ");
iblue at nerdpol:/tmp$ php -q bug.php
Command: [Press TAB twice]
Segmenation Fault
iblue at nerdpol:/tmp$
Backtrace:
#0 0x001986cd in ?? () from /usr/lib/i386-linux-gnu/libedit.so.2
#1 0x007274d9 in ?? () from /lib/i386-linux-gnu/libc.so.6
#2 0x00727ef4 in qsort_r () from /lib/i386-linux-gnu/libc.so.6
#3 0x0072801f in qsort () from /lib/i386-linux-gnu/libc.so.6
#4 0x001a1b55 in fn_display_match_list ()
from /usr/lib/i386-linux-gnu/libedit.so.2
#5 0x001a1f20 in fn_complete () from /usr/lib/i386-linux-gnu/libedit.so.2
#6 0x00195124 in rl_complete () from /usr/lib/i386-linux-gnu/libedit.so.2
#7 0x00195163 in ?? () from /usr/lib/i386-linux-gnu/libedit.so.2
#8 0x001a3847 in el_gets () from /usr/lib/i386-linux-gnu/libedit.so.2
#9 0x00192c5a in readline () from /usr/lib/i386-linux-gnu/libedit.so.2
#10 0x083b7abd in ?? ()
#11 0x083980ca in ?? ()
#12 0x08342f4e in execute ()
#13 0x0831bca9 in zend_execute_scripts ()
#14 0x082c2bde in php_execute_script ()
#15 0x0806b47f in ?? ()
#16 0x0070f113 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
#17 0x0806b521 in _start ()
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in Ubuntu.
https://bugs.launchpad.net/bugs/230030
Title:
php segfaults with readline
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/230030/+subscriptions
More information about the Ubuntu-server-bugs
mailing list