MantisBT - Xdebug
View Issue Details
0000355Xdebug(No Category)public2008-02-26 23:102009-11-22 19:43
ozgur 
 
normalmajoralways
closedfixed 
 
 
Debian
5.2.5
0000355: Invalid Trace File
In trace files, the same function number is shared between completely different functions (ie. function number collusion). I suspect it is related with handling of register_shutdown_function.

I can reproduce the situation with the following code:

<?php

function foo()
{
    echo "Hi";
}

function bar()
{
    echo "There";
}

register_shutdown_function("bar");

foo();

?>

The trace file output is:

Version: 2.0.2
TRACE START [2008-02-26 17:54:42]
1 0 0 0.003124 77936 {main} 1 /var/www/default/test.php 0
2 1 0 0.003831 77984 register_shutdown_function 0 /var/www/default/test.php 13
2 1 1 0.003971 78080
2 2 0 0.003998 78128 foo 1 /var/www/default/test.php 15
2 2 1 0.004064 78128
1 0 1 0.004082 78128
1 2 0 0.004122 76844 bar 1 /var/www/default/test.php 0
1 2 1 0.004145 76844
                        0.005341 7044
TRACE END [2008-02-26 17:54:42]

as you see both "foo" and "bar" functions have function # of 2.

Thanks!
No tags attached.
Issue History
2008-02-26 23:10ozgurNew Issue
2008-02-26 23:18ozgurNote Added: 0000828
2009-11-22 19:43derickNote Added: 0001163
2009-11-22 19:43derickStatusnew => closed
2009-11-22 19:43derickResolutionopen => fixed
2016-07-31 13:35derickCategoryDebug client (console) => debugclient (debugging tool)
2016-07-31 13:35derickCategorydebugclient (debugging tool) => (No Category)

Notes
(0000828)
ozgur   
2008-02-26 23:18   
I just noticed there is also an issue in the line just before "TRACE END":

0.005341 7044
(0001163)
derick   
2009-11-22 19:43   
Fixed in CVS.