Crash on *very* long script

From: Date: Fri, 28 Jan 2000 20:17:09 +0000
Subject: Crash on *very* long script
Groups: php.dev 
Request: Send a blank email to php-dev+get-14997@lists.php.net to get a copy of this message
For benchmarking purposes, I've made a script that has 10000 clauses like this: $varN = <<<ENDN var 0: $TEMPLATEN[var0] <another 19 statements like this> ENDN; this script crashes after running for some time, with this backtrace: Program received signal SIGSEGV, Segmentation fault. execute (op_array=0x812b288) at ./zend_execute.c:1186 1186 zend_print_variable(get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R)); (gdb) where #0 execute (op_array=0x812b288) at ./zend_execute.c:1186 #1 0x80762ac in php_execute_script (primary_file=0xbffff7c4) at main.c:1199 #2 0x8059ff1 in main (argc=2, argv=0xbffff824) at cgi_main.c:518 (gdb) info locals opline = (zend_op *) 0x401d2030 end = (zend_op *) 0x46dda470 function_state = {function_symbol_table = 0x0, function = 0x812b288, reserved = {0x8076293}} fbc = (zend_function *) 0x0 object = {ptr = 0x0} Ts = (temp_variable (*)[0]) 0xbf627e08 Don't ask me to send the script, it's some megs long :) But here is the meta-script that generates it: <? $tnum = 10000; print "<?\n"; for($i=0;$i<$tnum;$i++) { print "\$t$i = <<<TEND$i\nthis is a test $i\nvariable substitution\n"; for($j=1;$j<=20;$j++) { print "var $j: \$TEMPLATE${i}[var$j]\n"; } print "TEND$i;\n\n"; } print "?>\n"; ?> -- Stanislav Malyshev stas@zend.com +972-3-6139665

« previous php.dev (#14997) next »