Re: Off: [PEAR-DEV] PEAR base package docs broken

From: Date: Sun, 09 Jan 2005 09:01:27 +0000
Subject: Re: Off: [PEAR-DEV] PEAR base package docs broken
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-35425@lists.php.net to get a copy of this message
Hi Alan
If it is segfaulting - you may get lucky and see a meaningfull backtrace
Program received signal SIGSEGV, Segmentation fault. 0x00c713d4 in _int_free () from /lib/tls/libc.so.6 (gdb) backtrace #0 0x00c713d4 in _int_free () from /lib/tls/libc.so.6 #1 0x00c7272b in free () from /lib/tls/libc.so.6 #2 0x081043b9 in shutdown_memory_manager (silent=1, clean_cache=0) at /home/bertrand/down/php4-STABLE-200501071130/Zend/zend_alloc.c:492 #3 0x080eb790 in php_request_shutdown (dummy=0x0) at /home/bertrand/down/php4-STABLE-200501071130/main/main.c:1003 #4 0x0811fb57 in main (argc=6, argv=0xbfe8cf44) at /home/bertrand/down/php4-STABLE-200501071130/sapi/cli/php_cli.c:873 (gdb) Should I dump more stuff ? bye -- bertrand Gugger (toggg) command was: php4-STABLE-200501071130/sapi/cli/php -d memory_limit=80M -e growArray.php 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 999900 No [host] BEFORE add return ! Segmentation fault growArray.php: <?php /** * Try to make a too big array return */ error_reporting(E_ALL); class double { var $nothing; function doubleArray($arr ) { $ret = $arr; foreach ($arr as $elt) { $ret[] = $elt; } if (!isset($ret[count($ret)-1]['host'])) { exit ("\nNo [host] BEFORE double return !\n"); } return $ret; } function addArray($arr, $elt ) { $ret = $arr; $ret[] = $elt; if (!isset($ret[count($ret)-1]['host'])) { exit ("\nNo [host] BEFORE add return !\n"); } return $ret; } } $nb = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] + 0 : 19; $max = isset($_SERVER['argv'][2]) ? $_SERVER['argv'][2] + 0 : 1000000; //$verbose = isset($_SERVER['argv'][3]) ? false : true; $double = new double(); $reo = array('host' => 'www.example.com', 'service' => 'SMTP', 'code' => 0, 'message'=>'ça va bien'); $reb = array($reo); while ($nb--) { echo ("{$nb} "); $rea = $double->doubleArray( $reb); if (!isset($rea[count($rea)-1]['host'])) { exit ("\nNo [host] AFTER double return !\n"); } $reb = $rea; } echo ("\n"); while ($max--) { if (!($max%100)) echo ("{$max} "); $rea = $double->addArray( $reb, $reo); if (!isset($rea[count($rea)-1]['host'])) { exit ("\nNo [host] AFTER add return !\n"); } $reb = $rea; } ?>

« previous php.pear.dev (#35425) next »