View Issue Details

IDProjectCategoryView StatusLast Update
0000355Xdebugpublic2009-11-22 19:43
Reporterozgur Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Summary0000355: Invalid Trace File
Description

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!

TagsNo tags attached.
Operating SystemDebian
PHP Version5.2.5

Activities

ozgur

2008-02-26 23:18

reporter   ~0000828

I just noticed there is also an issue in the line just before "TRACE END":

0.005341 7044

derick

2009-11-22 19:43

administrator   ~0001163

Fixed in CVS.

Issue History

Date Modified Username Field Change
2008-02-26 23:10 ozgur New Issue
2008-02-26 23:18 ozgur Note Added: 0000828
2009-11-22 19:43 derick Note Added: 0001163
2009-11-22 19:43 derick Status new => closed
2009-11-22 19:43 derick Resolution open => fixed
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)