[xdebug-general] Re: $this construct crashes the debugger

From: Hando Tint <hando[@]vihmapuu.ee>
Date: Wed, 10 May 2006 16:09:35 +0300

Derick Rethans wrote:

>On Wed, 10 May 2006, Hando Tint wrote:
>
>
>
>>Thanks
>>
>>Things are better now but
>>
>>$this->undefinedproperty still crashes the system, but I created a bugreport
>>now in the right place.
>>
>>
>
>Yeah, I saw that and replied... I tested this yesterday and it should
>just work fine. You did you a version from CVS, right?
>
>
>
Yes I did. I got two problems with the current code:

1)
xdebug_handler_dbgp.c
in procedure
int xdebug_dbgp_init(xdebug_con *context, int mode)

    send_message(context, response TSRMLS_CC);
    xdebug_xml_node_dtor(response);

I think XG(remote_log_file) = NULL; is missing in front of this as
send_message is using remote_log_file. Anyway I got the init part to
crash already with the latest code without that fix.

2) if I am for example in main thread (not in an object method) and ask
for variable $this->somethingthatdoesnotexist then I get to _xdebug_do_eval.

res = zend_eval_string(eval_string, ret_zval, "xdebug eval" TSRMLS_CC);

will crash and eval_string does have that $this... so something in Zend
is crashing.

I did an idiotic quick hack

    if (*eval_string && strstr(eval_string, "$this->") == 0)
      res = zend_eval_string(eval_string, ret_zval, "xdebug eval"
TSRMLS_CC);
    else
      res = 0;

and got rid of the problem.

Thank you and please let me know if I should have posted this text to
somewhere else as it is quite code specific.

Hando Tint
Received on Wed May 10 2006 - 15:09:39 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST