Hi, Thanks for the good bug report. I have fixed this problem in the CVS.
Andi At 12:39 PM 6/14/2002 +0200, Hakan Kuecuekyilmaz wrote: >Hi, > >following script segfaults at > >in doubleloop 10/22 >Segmentation fault > ><?php >class benchmark >{ > var $index; > > function benchmark($num) > { > for ($i = 0; $i < $num; $i++) { > $this->index = $i; > } > } >} > >for ($i = 0; $i < 100; $i++) { > for ($j = 0; $j < 100; $j++) { > $arr[$i][$j] = new benchmark(100); > echo "in doubleloop ". $i . "/" . $j . "\n"; > } >} >?> > >with php 4.2.1 everything is fine > >here is a bt: > >#0 0x7059c7e8 in realloc () from /lib/libc.so.6 >#1 0x7059c758 in realloc () from /lib/libc.so.6 >#2 0x001940ac in _erealloc (ptr=0x313dd8, size=40960, allow_failure=0, > __zend_filename=0x21ba50 >"/usr/local/php-4.3.0-dev-zend2-alpha1/Zend/zend_objects_API.c", > __zend_lineno=51, __zend_orig_filename=0x0, __zend_orig_lineno=0) > at /usr/local/php-4.3.0-dev-zend2-alpha1/Zend/zend_alloc.c:298 >#3 0x001c5254 in zend_objects_store_put (object=0x3a7c00, > dtor=0x1c4440 <zend_objects_destroy_object>, clone=0) > at /usr/local/php-4.3.0-dev-zend2-alpha1/Zend/zend_objects_API.c:51 >#4 0x001c3f5c in zend_objects_new (object=0xefffdcc0, >class_type=0x320ce8) > at /usr/local/php-4.3.0-dev-zend2-alpha1/Zend/zend_objects.c:58 >#5 0x001b3aa0 in _object_and_properties_init (arg=0x3a7560, >class_type=0x320ce8, properties=0x0, > __zend_filename=0x21bc10 >"/usr/local/php-4.3.0-dev-zend2-alpha1/Zend/zend_execute.c", > __zend_lineno=2516) at >/usr/local/php-4.3.0-dev-zend2-alpha1/Zend/zend_API.c:594 >#6 0x001b3b9c in _object_init_ex (arg=0x3a7560, class_type=0x320ce8, > __zend_filename=0x21bc10 >"/usr/local/php-4.3.0-dev-zend2-alpha1/Zend/zend_execute.c", > __zend_lineno=2516) at >/usr/local/php-4.3.0-dev-zend2-alpha1/Zend/zend_API.c:610 >#7 0x001cf42c in execute (op_array=0x31b4a0) > at /usr/local/php-4.3.0-dev-zend2-alpha1/Zend/zend_execute.c:2516 >#8 0x001b1b18 in zend_execute_scripts (type=8, retval=0x0, >file_count=3) > at /usr/local/php-4.3.0-dev-zend2-alpha1/Zend/zend.c:833 >#9 0x001641fc in php_execute_script (primary_file=0xeffff8b8) > at /usr/local/php-4.3.0-dev-zend2-alpha1/main/main.c:1373 >#10 0x001d6008 in main (argc=2, argv=0xeffff9a4) > at /usr/local/php-4.3.0-dev-zend2-alpha1/sapi/cli/php_cli.c:674 > > >regards >-- >Hakan Kuecuekyilmaz, University of Applied Sciences Esslingen, Germany ><[EMAIL PROTECTED]> | <[EMAIL PROTECTED]> | <[EMAIL PROTECTED]> > > > >-- >PHP Development Mailing List <http://www.php.net/> >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php