Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13923 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30830 invoked by uid 1010); 22 Nov 2004 17:13:14 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 30794 invoked from network); 22 Nov 2004 17:13:14 -0000 Received: from unknown (HELO main.gmane.org) (80.91.229.2) by pb1.pair.com with SMTP; 22 Nov 2004 17:13:14 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CWHkS-0007CB-00 for ; Mon, 22 Nov 2004 18:13:08 +0100 Received: from pd95fb8f9.dip.t-dialin.net ([217.95.184.249]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Nov 2004 18:13:08 +0100 Received: from sb by pd95fb8f9.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Nov 2004 18:13:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: internals@lists.php.net Date: Mon, 22 Nov 2004 18:12:54 +0100 Lines: 78 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010502000803090508080405" X-Gmane-NNTP-Posting-Host: pd95fb8f9.dip.t-dialin.net User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en X-Enigmail-Version: 0.89.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Sender: news Subject: Segfault in PHP_5_0 and HEAD From: sb@sebastian-bergmann.de (Sebastian Bergmann) --------------010502000803090508080405 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit The following code from PHPUnit2 causes a segfault with PHP_5_0 and HEAD. public function run(PHPUnit2_Framework_Test $test) { $this->currentTest = $test; $this->startTest($test); set_error_handler(array($this, 'errorHandler')); try { $test->runBare(); } catch (PHPUnit2_Framework_AssertionFailedError $e) { $this->addFailure($test, $e); } catch (Exception $e) { $this->addError($test, $e); } restore_error_handler(); $this->endTest($test); $this->currentTest = NULL; } public function errorHandler($code, $message) { $this->errors[] = new PHPUnit2_Framework_TestFailure( $this->currentTest, new Exception($message, $code) ); } The segfault is triggered by the one line in the body of the errorHandler() method. As with most segfaults I discover while working on PHPUnit2 I could not reproduce it with a small standalone script. -- Sebastian Bergmann http://www.sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69 --------------010502000803090508080405 Content-Type: text/plain; name="stacktrace.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="stacktrace.txt" php5ts_debug.dll!zend_object_store_get_object(_zval_struct * zobject=0x00000004, void * * * tsrm_ls=0x00903128) Line 200 + 0x3 C php5ts_debug.dll!zend_objects_get_address(_zval_struct * zobject=0x00000004, void * * * tsrm_ls=0x00903128) Line 111 + 0xd C php5ts_debug.dll!zend_std_get_method(_zval_struct * * object_ptr=0x01315b28, char * method_name=0x012e26d0, int method_len=12, void * * * tsrm_ls=0x00903128) Line 680 + 0xd C php5ts_debug.dll!zend_call_function(_zend_fcall_info * fci=0x0012eb7c, _zend_fcall_info_cache * fci_cache=0x00000000, void * * * tsrm_ls=0x00903128) Line 688 + 0x30 C php5ts_debug.dll!call_user_function_ex(_hashtable * function_table=0x00908d90, _zval_struct * * object_pp=0x00000000, _zval_struct * function_name=0x01300058, _zval_struct * * retval_ptr_ptr=0x0012ed2c, unsigned int param_count=5, _zval_struct * * * params=0x01329a88, int no_separation=1, _hashtable * symbol_table=0x00000000, void * * * tsrm_ls=0x00903128) Line 551 + 0xf C php5ts_debug.dll!zend_error(int type=2048, const char * format=0x10568574, ...) Line 974 + 0x38 C php5ts_debug.dll!zend_do_fcall_common_helper(_zend_execute_data * execute_data=0x0012f084, _zend_op * opline=0x011fdd08, _zend_op_array * op_array=0x00b785c8, void * * * tsrm_ls=0x00903128) Line 2689 + 0x29 C php5ts_debug.dll!zend_do_fcall_by_name_handler(_zend_execute_data * execute_data=0x0012f084, _zend_op * opline=0x011fdd08, _zend_op_array * op_array=0x00b785c8, void * * * tsrm_ls=0x00903128) Line 2825 + 0x15 C php5ts_debug.dll!execute(_zend_op_array * op_array=0x00b785c8, void * * * tsrm_ls=0x00903128) Line 1400 + 0x17 C php5ts_debug.dll!zend_call_function(_zend_fcall_info * fci=0x0012f434, _zend_fcall_info_cache * fci_cache=0x00000000, void * * * tsrm_ls=0x00903128) Line 836 + 0x21 C php5ts_debug.dll!call_user_function_ex(_hashtable * function_table=0x00908d90, _zval_struct * * object_pp=0x00000000, _zval_struct * function_name=0x012e6430, _zval_struct * * retval_ptr_ptr=0x0012f558, unsigned int param_count=0, _zval_struct * * * params=0x0130a830, int no_separation=1, _hashtable * symbol_table=0x00000000, void * * * tsrm_ls=0x00903128) Line 551 + 0xf C php5ts_debug.dll!call_user_function(_hashtable * function_table=0x00908d90, _zval_struct * * object_pp=0x00000000, _zval_struct * function_name=0x012e6430, _zval_struct * retval_ptr=0x0012f678, unsigned int param_count=0, _zval_struct * * params=0x0127dc44, void * * * tsrm_ls=0x00903128) Line 526 + 0x25 C php5ts_debug.dll!user_shutdown_function_call(_php_shutdown_function_entry * shutdown_function_entry=0x01281c48, void * * * tsrm_ls=0x00903128) Line 2121 + 0x40 C php5ts_debug.dll!zend_hash_apply(_hashtable * ht=0x0132d058, int (void *, void * * *)* apply_func=0x103c2a30, void * * * tsrm_ls=0x00903128) Line 664 + 0x10 C php5ts_debug.dll!php_call_shutdown_functions() Line 2197 + 0x1f C php5ts_debug.dll!php_request_shutdown(void * dummy=0x00000000) Line 1195 C php.exe!main(int argc=5, char * * argv=0x00902cf8) Line 1046 + 0xa C php.exe!mainCRTStartup() Line 398 + 0x11 C kernel32.dll!7c816d4f() kernel32.dll!7c8399f3() --------------010502000803090508080405--