ID:               47949
 Updated by:       fel...@php.net
 Reported By:      rannou dot sebastien at gmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Readline related
 Operating System: GNU/Linux
 PHP Version:      5.2.9
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

I can't reproduce it using libreadline 5.2-4.


Previous Comments:
------------------------------------------------------------------------

[2009-04-11 12:14:45] rannou dot sebastien at gmail dot com

Description:
------------
If the registered function from readline_completion_function returns an
empty array, a segmentation fault happens when trying to tab.

Reproduce code:
---------------
<?php

// script.php

function  foo()
{
    return array();
}

readline_completion_function('foo');

while (42)
   echo readline('> ');

?>

Expected result:
----------------
Doing nothing or printing a new prompt.

Actual result:
--------------
$> php script.php
> 
Segmentation fault
$>


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47949&edit=1

Reply via email to