Reproduceable crash with custmo widget and $this->foo[]

From: Date: Sun, 03 Mar 2002 12:01:43 +0000
Subject: Reproduceable crash with custmo widget and $this->foo[]
Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-361@lists.php.net to get a copy of this message
The following code crashes php-gtk. Workaround: function b() { $d = $this->c; $d[] = 1; $this->c = $d; <?php dl('php_gtk.so'); class mywindow extends gtkwindow { function b() { $this->array[] = 1; } } $a = new mywindow; $a->b(); ?> (gdb) r -f crash.php The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/mfischer/php4/bin/php -f crash.php Program received signal SIGSEGV, Segmentation fault. 0x08120f3f in fetch_overloaded_element (result=0x81b9e10, op1=0x81b9e20, op2=0x81b9e30, Ts=0xbfffe074, type=1, retval=0xbfffe0ac, overloaded_element_type=1) at ./zend_execute.c:700 700 overloaded_element.element = *get_zval_ptr(op2, Ts, &EG(free_op2), type); (gdb) bt #0 0x08120f3f in fetch_overloaded_element (result=0x81b9e10, op1=0x81b9e20, op2=0x81b9e30, Ts=0xbfffe074, type=1, retval=0xbfffe0ac, overloaded_element_type=1) at ./zend_execute.c:700 #1 0x0812108f in zend_fetch_dimension_address (result=0x81b9e10, op1=0x81b9e20, op2=0x81b9e30, Ts=0xbfffe074, type=1) at ./zend_execute.c:723 #2 0x081232a3 in execute (op_array=0x81bad1c) at ./zend_execute.c:1274 #3 0x08124e4b in execute (op_array=0x81b4864) at ./zend_execute.c:1638 #4 0x08073669 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at zend.c:810 #5 0x08081411 in php_execute_script (primary_file=0xbffff5f0) at main.c:1333 #6 0x0805e34f in main (argc=3, argv=0xbffff674) at php_cli.c:555 #7 0x400bb65f in __libc_start_main () from /lib/libc.so.6 -- Please always Cc to me when replying to me on the lists. GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc

« previous php.gtk.dev (#361) next »