Bug #66412 [NEW]: readline_clear_history() with libedit causes segfault after #65714

From: Date: Sat, 04 Jan 2014 19:27:33 +0000
Subject: Bug #66412 [NEW]: readline_clear_history() with libedit causes segfault after #65714
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183590@lists.php.net to get a copy of this message
From: php at 0x7f dot us Operating system: OS X 10.9.1 PHP version: 5.5.7 Package: Readline related Bug Type: Bug Bug description:readline_clear_history() with libedit causes segfault after #65714 Description: ------------ Since PHP 5.5.7, calling readline_clear_history() segfaults. PHP 5.5.7 (installed via Homebrew) OS X 10.9 And whatever libedit version ships with OS X 10.9 (Mavericks). From the readline.h file: /* $NetBSD: readline.h,v 1.33 2012/05/15 17:30:04 christos Exp $ */ Note that this is over 11 years newer than the header comment in the SourceForge project linked from the readline ext readme (http://sourceforge.net/projects/libedit/) /* $NetBSD: readline.h,v 1.1 2001/01/05 21:15:50 jdolecek Exp $ */ This version of libedit seems to actually be maintained, I imagine it is more like what is available on OS X: http://www.thrysoee.dk/editline Reverting b8d88bf (a fix for #65714) fixes the segfault. Configure command: ./configure --prefix=/usr/local/Cellar/php55/5.5.7 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.5 --with-config-file-path=/usr/local/etc/php/5.5 --with-config-file-scan-dir=/usr/local/etc/php/5.5/conf.d --with-iconv-dir=/usr --enable-dba --with-ndbm=/usr --enable-exif --enable-soap --enable-wddx --enable-ftp --enable-sockets --enable-zip --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-mbstring --enable-mbregex --enable-bcmath --enable-calendar --with-zlib=/usr/local/opt/zlib --with-ldap --with-ldap-sasl=/usr --with-xmlrpc --with-kerberos=/usr --with-gd --enable-gd-native-ttf --with-freetype-dir=/usr/local/opt/freetype --with-jpeg-dir=/usr/local/opt/jpeg --with-png-dir=/usr/local/opt/libpng --with-gettext=/usr/local/opt/gettext --with-snmp=/usr --with-libedit --with-unixODBC=/usr/local/opt/unixodbc --with-pdo-odbc=unixODBC,/usr/local/opt/unixodbc --mandir=/usr/local/Cellar/php55/5.5.7/share/man --with-mhash --with-curl --with-bz2=/usr --disable-debug --with-openssl=/usr --with-xsl=/usr --with-apxs2=/usr/sbin/apxs --libexecdir=/usr/local/Cellar/php55/5.5.7/libexec --with-mysql-sock=/tmp/mysql.sock --with-mysqli=mysqlnd --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --enable-pcntl --enable-zend-signals --enable-dtrace --enable-opcache Test script: --------------- <?php readline_clear_history(); Expected result: ---------------- Expected nothing to happen. Actual result: -------------- 'php test.php ' terminated by signal SIGSEGV (Address boundary error) -- Edit bug report at https://bugs.php.net/bug.php?id=66412&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66412&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66412&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66412&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=66412&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=66412&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=66412&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=66412&r=needscript Try newer version: https://bugs.php.net/fix.php?id=66412&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=66412&r=support Expected behavior: https://bugs.php.net/fix.php?id=66412&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=66412&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=66412&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=66412&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66412&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=66412&r=dst IIS Stability: https://bugs.php.net/fix.php?id=66412&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=66412&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=66412&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=66412&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=66412&r=mysqlcfg

« previous php.bugs (#183590) next »