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
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()
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php