From: steve-php-dev at spamwiz dot com Operating system: CentOS 3 PHP version: 5.2.0 PHP Bug Type: Reproducible crash Bug description: array_merge() crashes under certain conditions
Description: ------------ If more than two arrays are passed to array_merge(), I get a segfault. This happens on one server, but not another. Here is the configure command for the one that has the problem, followed by the configure for the one that does not have the problem: BAD SERVER './configure' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--with-zlib' '--enable-soap' '--enable-mbstring' '--with-openssl' '--with-config-file-path=/etc/php' '--with-config-file-scan-dir=/etc/php/apache.d' '--with-apache=../apache_1.3.37' '--enable-track-vars' '--without-pear' '--disable-cli' '--with-imap' '--with-imap-ssl' '--with-ldap' '--with-kerberos' '--with-gmp' '--without-spl' '--without-sqlite' '--without-pdo' '--enable-gd-native-ttf' '--with-gd' '--with-png-dir' '--with-freetype-dir' '--with-mssql' GOOD SERVER './configure' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--enable-soap' '--with-zlib' '--enable-mbstring' '--with-openssl' '--with-config-file-path=/etc/php' '--with-config-file-scan-dir=/etc/php/apache.d' '--with-apache=../apache_1.3.37' '--enable-track-vars' '--without-pear' '--disable-cli' '--with-gmp' '--without-spl' '--without-sqlite' '--without-pdo' Reproduce code: --------------- <? $arr1 = array(1, 2, 3); $arr2 = array(4, 5, 6); $arr3 = array(7, 8, 9); $arr = array_merge($arr1, $arr2, $arr3); header("Content-Type: text/plain"); print_r($arr); ?> Expected result: ---------------- Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 ) Actual result: -------------- segfault -- Edit bug report at http://bugs.php.net/?id=39749&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39749&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39749&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39749&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39749&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39749&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39749&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39749&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39749&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39749&r=support Expected behavior: http://bugs.php.net/fix.php?id=39749&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39749&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39749&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39749&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39749&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39749&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39749&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39749&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39749&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39749&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39749&r=mysqlcfg