PHP 4.0 Bug #3698: Segfault w/ classes

From: Date: Thu, 02 Mar 2000 06:25:08 +0000
Subject: PHP 4.0 Bug #3698: Segfault w/ classes
Groups: php.dev 
Request: Send a blank email to php-dev+get-16258@lists.php.net to get a copy of this message
From: johan@ekenberg.nu Operating system: Linux 2.2.14 SMP PHP version: 4.0 Latest CVS (02/03/2000) PHP Bug Type: Reproduceable crash Bug description: Segfault w/ classes This "extremely reduced" code segfaults Apache, (backtrace below): <?php class Base_class { function Base_class () { $this->First = new First_class(); } } class First_class extends Base_class { function First_class() { $this->Sec = new Second_class(); } } class Second_class extends Base_class { } $Obj = new First_class(); ?> ============================= backtrace ============================= (gdb) run -X Starting program: /usr/local/apache/bin/./httpd -X Program received signal SIGSEGV, Segmentation fault. 0x400c2405 in kill () from /lib/libc.so.5 (gdb) bt #0 0x400c2405 in kill () from /lib/libc.so.5 #1 0x809816b in _erealloc (ptr=0x8522964, size=4294840312, allow_failure=0, __zend_filename=0x820234e "zend_ptr_stack.c", __zend_lineno=53, __zend_orig_filename=0x0, __zend_orig_lineno=0) at zend_alloc.c:230 #2 0x80a7b7c in zend_ptr_stack_n_push (stack=0x8284d64, count=2) at zend_ptr_stack.c:53 #3 0x811d0b4 in execute (op_array=0x83714d4) at ./zend_execute.c:1490 #4 0x811d7f7 in execute (op_array=0x83719fc) at ./zend_execute.c:1637 #5 0x811d7f7 in execute (op_array=0x83714d4) at ./zend_execute.c:1637 #6 0x811d7f7 in execute (op_array=0x83719fc) at ./zend_execute.c:1637 <snip>Cut 8443 identical alternating lines</snip> #8449 0x811d7f7 in execute (op_array=0x83714d4) at ./zend_execute.c:1637 #8450 0x811d7f7 in execute (op_array=0x8369814) at ./zend_execute.c:1637 #8451 0x808f18a in php_execute_script (primary_file=0xbffff80c) at main.c:1146 #8452 0x80b7ed9 in apache_php_module_main (r=0x8340fec, fd=19, display_source_mode=0) at sapi_apache.c:88 #8453 0x8089e66 in send_php () #8454 0x8089eb0 in send_parsed_php () #8455 0x8148273 in ap_invoke_handler () #8456 0x815e689 in process_request_internal () #8457 0x815e6ec in ap_process_request () #8458 0x8154a79 in child_main () #8459 0x8154c38 in make_child () #8460 0x8154dc3 in startup_children () #8461 0x8155444 in standalone_main () #8462 0x8155db3 in main () #8463 0x806e00e in _start ()

« previous php.dev (#16258) next »