View Issue Details

IDProjectCategoryView StatusLast Update
0000103XdebugUsage problems (Wrong Results)public2004-12-04 22:46
Reportersegv74Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000103: crashes when eval global variable
Descriptionwhen i eval global variables, it crashes.

<?
class X
{
  public $Y;
}

$P = new X;
$P->Y = "123"; //<-- eval($P) here and crashed
print_r($P);
?>
Additional Informationcode belows works fine.

$ cvs diff xdebug_var.c
Index: xdebug_var.c
===================================================================
RCS file: /repository/xdebug/xdebug_var.c,v
retrieving revision 1.54
diff -r1.54 xdebug_var.c
445,449c445,454
< if (parent_name[0] != '$') {
< full_name = xdebug_sprintf("$%s->%s", parent_name, prop_name);
< } else {
< full_name = xdebug_sprintf("%s->%s", parent_name, prop_name);
< }
---
> if (parent_name) {
> if (parent_name[0] != '$') {
> full_name = xdebug_sprintf("$%s->%s", parent_name, prop_name);
> } else {
> full_name = xdebug_sprintf("%s->%s", parent_name, prop_name);
> }
> }
> else {
> full_name = xdebug_sprintf("$%s", prop_name);
> }
TagsNo tags attached.
Operating Systemlinux
PHP Version5.0.2

Activities

derick

2004-11-28 13:38

administrator   ~0000216

Reminder sent to segv74

I can not reproduce this, and I'm also not sure what you mean by "eval at this point". How do you eval it, with the remote debugger? If so, which protocol... I need some more information here.

derick

2004-12-04 22:46

administrator   ~0000219

This is now fixed in CVS, but your patch was incorrect as the fullname of the properties would have been incorrectly set. In order to work around this the fullname attribute will simply not be set at all now.

Issue History

Date Modified Username Field Change
2004-11-18 06:54 segv74 New Issue
2004-11-28 13:38 derick Note Added: 0000216
2004-12-04 22:46 derick Status new => closed
2004-12-04 22:46 derick Note Added: 0000219
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)