Edit report at https://bugs.php.net/bug.php?id=61584&edit=1
ID: 61584 Updated by: fel...@php.net Reported by: osama dot sorour at eformations dot net Summary: when using readline_info to set line_buffer, it causes memory corruption -Status: Open +Status: Feedback Type: Bug Package: Readline related Operating System: Linux PHP Version: 5.4.0 Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2012-03-31 19:08:23] osama dot sorour at eformations dot net Description: ------------ Using the function readline_info to set the property "line_buffer" performs a direct setting of readline rl_line_buffer. It works for short lived scripts but for longer ones, they start to crash randomly with sig violations. The proper way for libreadline is to use rl_replace_line to set the line buffer. In addition, readline_info does not allow you to set "point" and "end" properties that are needed when changing line_buffer. I've included a patch that fixes the setting of "line_buffer" and adds the ability to set both "point" and "end" properties. Test script: --------------- None. Random crashes. Expected result: ---------------- None. Actual result: -------------- None. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61584&edit=1