MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000018XdebugUsage problems (Wrong Results)public2003-09-25 13:212003-09-25 14:53
Reportertony2001 
Assigned To 
PrioritynormalSeveritytrivialReproducibilityalways
StatusclosedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000018: Some indexes in profiling result array are broken
Description<?
xdebug_start_profiling(XDEBUG_PROFILER_FS_NC);
class bar {
    function bar () {
        $this->foo ();
    }
    function foo () {
        $temp = '';
        for ($i = 0; $i < 100; $i++) {
            $temp .= md5 ($i);
        }
    }
}

$a = new bar;
$a->foo ();

var_dump (xdebug_get_function_profile());
?>

This script will produce rather weird results:
array
      'function' => 'bar'
      'class' => 'bar'
      'method_87eb1b2dc ' => 'public' <---- Pay attention to the index
      'n_calls' => 1
      'ttl_time' => 0.0024749803124
      'origin' => 'user'
      'level' => 0
Additional InformationI've tested it on
Win32 & PHP 4.3.3 & XDebug 1.2
Linux & PHP 4.3.4-dev & Xdebug 1.2/1.3
Linux & PHP 5.0.0-dev & Xdebug 1.2/1.3
same results everytime.
this feature disappears if md5() is commented out, so I really don't know if it belongs to PHP or XDebug, but it seems to be likely bug of XDebug...
TagsNo tags attached.
Operating SystemLinux
PHP Version5.0.0-dev
Attached Files

- Relationships

-  Notes
(0000013)
derick (administrator)
2003-09-25 13:41

Okay, I reproduced this. Going to try to fix it now.

Derick
(0000014)
derick (administrator)
2003-09-25 14:53

Fixed in CVS!

- Issue History
Date Modified Username Field Change
2003-09-25 13:21 tony2001 New Issue
2003-09-25 13:41 derick Note Added: 0000013
2003-09-25 13:41 derick Status new => confirmed
2003-09-25 13:41 derick Category Debug client (console) => Usage problems
2003-09-25 14:53 derick Note Added: 0000014
2003-09-25 14:53 derick Status confirmed => closed
2016-07-31 13:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 13:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker