|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-26 15:30 UTC] magnus@php.net
[2004-09-26 16:11 UTC] guth at fiifo dot u-psud dot fr
[2004-09-27 08:11 UTC] magnus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun May 24 15:00:01 2026 UTC |
Description: ------------ [ bad english, i know ] It seems that PHP 5 is not very stable. My code segfaults every 3-4 days :'( Reproduce code: --------------- <?php class B { } class A { public $b; public function __construct() { $this->b = new B; } public function build() { return $this->b; } } class C { private $b; public function __construct() { $a = new A(); $this->b = $a->build(); try { throw new Exception; } catch(Exception $e) { } } public function __destruct() { throw new Exception; } } $C = new C; ?> Expected result: ---------------- Something like "An uncaught exception has been thrown..." Note that the code works as expected if you remove the following lines : "$a = new A(); $this->b = $a->build();" Actual result: -------------- segmentation fault :) (gdb) bt #0 0x08205ec8 in zend_objects_destroy_object (object=0x831ae6c, handle=3) at /usr/src/php-5.0.1/Zend/zend_objects.c:37 #1 0x082089ec in zend_objects_store_del_ref (zobject=0x831ae2c) at /usr/src/php-5.0.1/Zend/zend_objects_API.c:144 #2 0x081efe22 in _zval_dtor (zvalue=0x831ae2c, __zend_filename=0x82641e0 "/usr/src/php-5.0.1/Zend/zend_execute_API.c", __zend_lineno=391) at /usr/src/php-5.0.1/Zend/zend_variables.c:61 #3 0x081e465c in _zval_ptr_dtor (zval_ptr=0x8307848, __zend_filename=0x8265100 "/usr/src/php-5.0.1/Zend/zend_variables.c", __zend_lineno=193) at /usr/src/php-5.0.1/Zend/zend_execute_API.c:391 #4 0x081f0174 in _zval_ptr_dtor_wrapper (zval_ptr=0x8307848) at /usr/src/php-5.0.1/Zend/zend_variables.c:193 #5 0x081f96c4 in zend_hash_destroy (ht=0x8313e7c) at /usr/src/php-5.0.1/Zend/zend_hash.c:519 #6 0x0820612e in zend_objects_free_object_storage (object=0x831ac04) at /usr/src/php-5.0.1/Zend/zend_objects.c:88 #7 0x08208749 in zend_objects_store_free_object_storage (objects=0x8288664) at /usr/src/php-5.0.1/Zend/zend_objects_API.c:72 #8 0x081e418b in shutdown_executor () at /usr/src/php-5.0.1/Zend/zend_execute_API.c:272 #9 0x081f17c3 in zend_deactivate () at /usr/src/php-5.0.1/Zend/zend.c:819 #10 0x081aa454 in php_request_shutdown (dummy=0x0) at /usr/src/php-5.0.1/main/main.c:1212 #11 0x082232b8 in main (argc=2, argv=0xbffff624) at /usr/src/php-5.0.1/sapi/cli/php_cli.c:1046