Bug #61584 [NEW]: when using readline_info to set line_buffer, it causes memory corruption
From:
Operating system: Linux
PHP version: 5.4.0
Package: Readline related
Bug Type: Bug
Bug description:when using readline_info to set line_buffer, it causes memory corruption
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 bug report at https://bugs.php.net/bug.php?id=61584&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61584&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61584&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61584&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=61584&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61584&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=61584&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=61584&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=61584&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=61584&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=61584&r=support
Expected behavior: https://bugs.php.net/fix.php?id=61584&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=61584&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=61584&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=61584&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61584&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=61584&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=61584&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=61584&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=61584&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=61584&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=61584&r=mysqlcfg
Thread (4 messages)
- osama dot sorour at eformations dot net