[xdebug-dev] xdebug xdebug/php_xdebug.h xdebug/xdebug.c xdebug/xdebug_handler_dbgp.c - Fixed bug #183: property_get -n $this->somethingnonexistent crashes the

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Mon, 15 May 2006 23:41:05 +0200

Date: Mon May 15 23:41:05 CEST 2006
User: Derick Rethans
Directory: xdebug

Log Message:
[4.00]
- Fixed bug #183: property_get -n $this->somethingnonexistent crashes the
  debugger.
#- And thanks to Marcus for helping me figuring out the problem.

Modified files:
           xdebug/php_xdebug.h (version: 1.106)
           xdebug/xdebug.c (version: 1.317)
           xdebug/xdebug_handler_dbgp.c (version: 1.94)

[FILE: /xdebug/php_xdebug.h]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- xdebug/php_xdebug.h:1.105 Mon May 15 19:34:05 2006 GMT
+++ xdebug/php_xdebug.h Mon May 15 19:41:05 2006 GMT
@@ -166,7 +166,6 @@
         /* remote debugging globals */
         zend_bool remote_enabled;
         zend_bool breakpoints_allowed;
- zend_bool ignore_fatal_error;
         xdebug_con context;
         unsigned int breakpoint_count;
 

[FILE: /xdebug/xdebug.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.316
retrieving revision 1.317
diff -u -r1.316 -r1.317
--- xdebug/xdebug.c:1.316 Mon May 15 19:34:05 2006 GMT
+++ xdebug/xdebug.c Mon May 15 19:41:05 2006 GMT
@@ -701,7 +701,6 @@
         XG(remote_enabled) = 0;
         XG(profiler_enabled) = 0;
         XG(breakpoints_allowed) = 1;
- XG(ignore_fatal_error) = 0;
         if (XG(auto_trace) && XG(trace_output_dir) && strlen(XG(trace_output_dir))) {
                 /* In case we do an auto-trace we are not interested in the return
                  * value, but we still have to free it. */
@@ -1937,15 +1936,12 @@
                 case E_COMPILE_ERROR:
                 case E_USER_ERROR:
                         EG(exit_status) = 255;
- if (!XG(ignore_fatal_error)) {
 #if MEMORY_LIMIT
                         /* restore memory limit */
- AG(memory_limit) = PG(memory_limit);
+ AG(memory_limit) = PG(memory_limit);
 #endif
- zend_bailout();
- return;
- }
- break;
+ zend_bailout();
+ return;
         }
 
         if (PG(track_errors) && EG(active_symbol_table)) {

[FILE: /xdebug/xdebug_handler_dbgp.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- xdebug/xdebug_handler_dbgp.c:1.93 Sat May 13 15:40:18 2006 GMT
+++ xdebug/xdebug_handler_dbgp.c Mon May 15 19:41:05 2006 GMT
@@ -1148,13 +1148,11 @@
 
         /* Do evaluation */
         XG(breakpoints_allowed) = 0;
- XG(ignore_fatal_error) = 1;
         res = zend_eval_string(eval_string, ret_zval, "xdebug eval" TSRMLS_CC);
 
         /* Clean up */
         EG(error_reporting) = old_error_reporting;
         XG(breakpoints_allowed) = 1;
- XG(ignore_fatal_error) = 0;
 
         return res;
 }
@@ -1537,24 +1535,6 @@
         HashTable *tmp_symbol_table;
 
         contents = get_symbol(name, name_length, options TSRMLS_CC);
- if (!contents && !no_eval && XG(active_symbol_table)) {
- char *varname = NULL;
- if (var_only && name[0] != '$' && !strstr(name, "::$")) {
- varname = xdebug_sprintf("$%s", name);
- }
- /* if we cannot get the value directly, then try eval */
- tmp_symbol_table = EG(active_symbol_table);
- EG(active_symbol_table) = XG(active_symbol_table);
- res = _xdebug_do_eval(varname ? varname : name, &ret_zval TSRMLS_CC);
- EG(active_symbol_table) = tmp_symbol_table;
- if (res != FAILURE && (!non_null || Z_TYPE_P(&ret_zval) != IS_NULL)) {
- contents = get_zval_value_xml_node(name, &ret_zval, options);
- zval_dtor(&ret_zval);
- }
- if (varname) {
- xdfree(varname);
- }
- }
         if (contents) {
                 xdebug_xml_add_child(node, contents);
                 return SUCCESS;
@@ -1669,27 +1649,6 @@
         HashTable *tmp_symbol_table;
 
         contents_found = get_symbol_contents(name, name_length, node, options TSRMLS_CC);
- if (!contents_found && !no_eval) {
- char *varname = NULL;
- if (var_only && name[0] != '$' && !strstr(name, "::$")) {
- varname = xdebug_sprintf("$%s", name);
- }
- /* if we cannot get the value directly, then try eval */
- tmp_symbol_table = EG(active_symbol_table);
- EG(active_symbol_table) = XG(active_symbol_table);
- res = _xdebug_do_eval(varname ? varname : name, &ret_zval TSRMLS_CC);
- EG(active_symbol_table) = tmp_symbol_table;
- if (res != FAILURE && (!non_null || Z_TYPE_P(&ret_zval) != IS_NULL)) {
- zval *tmp_zval = &ret_zval;
-
- xdebug_var_export_xml_node(&tmp_zval, name, node, options, 1 TSRMLS_CC);
- contents_found = 1;
- zval_dtor(&ret_zval);
- }
- if (varname) {
- xdfree(varname);
- }
- }
         if (contents_found) {
                 return SUCCESS;
         }
@@ -2106,7 +2065,7 @@
 
 char *xdebug_dbgp_get_revision(void)
 {
- return "$Revision: 1.93 $";
+ return "$Revision: 1.94 $";
 }
 
 int xdebug_dbgp_cmdloop(xdebug_con *context TSRMLS_DC)
Received on Mon May 15 2006 - 23:41:10 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST