From: [EMAIL PROTECTED] Operating system: Irrelevant PHP version: Irrelevant PHP Bug Type: Reproducible crash Bug description: segfaults with recursive function calls
Description: ------------ PHP crashes after some time when recursive function calls are used intensively. Probably a "Wont Fix"? -> Bug #8471 Reproduce code: --------------- <?php function _r(){ echo round(memory_get_usage()/1024) . "k\n"; _r(); } _r(); ?> Expected result: ---------------- endless loop, which outputs nearly similar memory usage as it would with "while(true){ _r(); }" without recursion Actual result: -------------- increasing memory usage till segfault after a few seconds Backtrace of PHP 5.0.0b2: #0 0x408e5acb in __printf_fp () from /lib/libc.so.6 #1 0xbfe0105c in ?? () #2 0x408e2e85 in vfprintf () from /lib/libc.so.6 #3 0x408fb46b in vsprintf () from /lib/libc.so.6 #4 0x408e89dd in sprintf () from /lib/libc.so.6 #5 0x08236388 in zend_locale_sprintf_double (op=0x409c3ff4) at /usr/local/src/php-5.0.0b2/Zend/zend_operators.c:1845 #6 0x082370fb in zend_make_printable_zval (expr=0x409c3ff4, expr_copy=0x2, use_copy=0x9) at /usr/local/src/php-5.0.0b2/Zend/zend.c:245 #7 0x08234ee8 in concat_function (result=0x9, op1=0x409c3ff4, op2=0x2) at /usr/local/src/php-5.0.0b2/Zend/zend_operators.c:1083 #8 0x08252a11 in zend_concat_handler (execute_data=0x2, op_array=0x83fad68) at /usr/local/src/php-5.0.0b2/Zend/zend_execute.c:1361 #9 0x082524c5 in execute (op_array=0x83fad68) at /usr/local/src/php-5.0.0b2/Zend/zend_execute.c:1271 #10 0x082555e0 in zend_do_fcall_common_helper (execute_data=0x9, op_array=0x83fad68) at /usr/local/src/php-5.0.0b2/Zend/zend_execute.c:2579 #11 0x082524c5 in execute (op_array=0x83fad68) [............................................] #10843 0x082524c5 in execute (op_array=0x83fad68) at /usr/local/src/php-5.0.0b2/Zend/zend_execute.c:1271 #10844 0x082555e0 in zend_do_fcall_common_helper (execute_data=0xbfffd930, op_array=0x40a5ce4c) at /usr/local/src/php-5.0.0b2/Zend/zend_execute.c:2579 #10845 0x082524c5 in execute (op_array=0x40a5ce4c) at /usr/local/src/php-5.0.0b2/Zend/zend_execute.c:1271 #10846 0x08238355 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php-5.0.0b2/Zend/zend.c:1009 #10847 0x08206d9d in php_execute_script (primary_file=0xbffffce0) at /usr/local/src/php-5.0.0b2/main/main.c:1622 #10848 0x082654a2 in main (argc=2, argv=0xbffffd64) at /usr/local/src/php-5.0.0b2/sapi/cli/php_cli.c:910 -- Edit bug report at http://bugs.php.net/?id=26212&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26212&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26212&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26212&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26212&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26212&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26212&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26212&r=support Expected behavior: http://bugs.php.net/fix.php?id=26212&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26212&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26212&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26212&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26212&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26212&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26212&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26212&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26212&r=float