Re: Reproduceable crash with custmo widget and $this->foo[]
| From: | Alan Knowles | Date: | Sun, 03 Mar 2002 15:50:15 +0000 |
| Subject: | Re: Reproduceable crash with custmo widget and $this->foo[] | ||
| References: | 1 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-362@lists.php.net to get a copy of this message | ||
Is that php from CVS?
- I presume
class mywindow extends gtkwindow {
var $array = array();
function b() {
$this->array[] = 1;
}
}
fixes it as well -
I suspect ive I've seen that before as well..
regards
alan
Markus Fischer wrote:
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:700700 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