From: cyrrus at mail dot ru Operating system: FreeBSD 5.3 PHP version: 5.2.12 PHP Bug Type: Reproducible crash Bug description: Simple recursion results in bus error (core dumped) on approx 10k depth
Description: ------------ Configure: ./configure --disable-all --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-zlib --with-zlib-dir=/src/zlib-1.2.1/ --with-libxml-dir --enable-sockets --with-gd=/usr/local/ --with-pcre-regex --with-png-dir=/src/libpng-1.2.8-config --with-freetype-dir=/usr/local/include/freetype2/ --enable-gd-native-ttf --with-ttf --disable-reflection --with-iconv --enable-session --enable-spl --enable-libxml --enable-simplexml Eaccelerator 0.9.5.3 is used. #0 ZEND_RECV_SPEC_HANDLER (execute_data=0xbfb000d0) at /src/php-5.2.12/Zend/zend_execute.c:276 #1 0x0818d105 in execute (op_array=0x8397600) at zend_vm_execute.h:92 #2 0x0818d351 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfb00210) at zend_vm_execute.h:234 #3 0x0818d105 in execute (op_array=0x8397600) at zend_vm_execute.h:92 #4 0x0818d351 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfb00350) at zend_vm_execute.h:234 ... ... #6486 0x08173731 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /src/php-5.2.12/Zend/zend.c:1134 #6487 0x0813a7b1 in php_execute_script (primary_file=0xbfbfec64) at /src/php-5.2.12/main/main.c:2036 #6488 0x081ef55d in main (argc=3, argv=0xbfbfed04) at /src/php-5.2.12/sapi/cli/php_cli.c:1165 Reproduce code: --------------- <?php function MyRecurs( $a ) { $a++; if ( $a < 100000 ) return MyRecurs( $a ); else return 1; } echo "MyRecurs = " . MyRecurs( 0 ); ?> Expected result: ---------------- MyRecurs = 1 or Fatal error: Allowed memory size of *** bytes exhausted (tried to allocate *** bytes) in ***.php on line 5 Actual result: -------------- Bus error (core dumped) -- Edit bug report at http://bugs.php.net/?id=50863&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50863&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50863&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50863&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50863&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50863&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50863&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50863&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50863&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50863&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50863&r=support Expected behavior: http://bugs.php.net/fix.php?id=50863&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50863&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50863&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50863&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50863&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50863&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50863&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50863&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50863&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50863&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50863&r=mysqlcfg