View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000172 | Xdebug | Uncategorized | public | 2006-03-10 13:05 | 2006-10-03 20:14 |
Reporter | Xuefer | Assigned To | derick | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | gentoo | OS | linux | OS Version | lastest stable |
Product Version | 2.0.0dev | ||||
Summary | 0000172: coverage produce wrong coverage | ||||
Description | 1. not all opcode is catched by coverage at runtime a.php <?php xdebug_start_code_coverage(XDEBUG_CC_UNUSED); include("b.php"); ?> b.php <?php $a = ""; $a = "" . "abc{$a}abc" . "abc" ; $cov = xdebug_get_code_coverage(); print_r($cov); ?> result: Array ( [/home/xuefer/htdocs/skydotnet_php5/matrix/debug/test/a.php] => Array ( [4] => 1 ) [/home/xuefer/htdocs/skydotnet_php5/matrix/debug/test/abc.php] => Array ( [3] => 1 [6] => 1 [7] => -1 [8] => -1 [9] => 1 [10] => -1 [13] => -1 ) ) at least [7] => -1 [8] => -1 should be both 1 2. i'd suggest -1 to be 0 3. very slow with XDEBUG_CC_UNUSED, xdebug_prefil_code_coverage() is executed no matter if the op_array is done before. suggested fix: a. move it to xdebug_compile_file() b. add a hash (by pointer) that avoid re-fill the same op_array, but the file included before xdebug_start_code_coverage is will not be prefilled c. when xdebug_get_code_coverage(XDEBUG_CC_UNUSED), loop though all the op_array(file/function/class method) for xdebug_prefil_code_coverage(), it could be a bit hard to get the file op_array | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 4.3.11 | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2006-03-10 13:05 | Xuefer | New Issue | |
2006-10-03 20:14 | derick | Status | new => resolved |
2006-10-03 20:14 | derick | Resolution | open => fixed |
2006-10-03 20:14 | derick | Assigned To | => derick |
2006-10-03 20:14 | derick | Note Added: 0000468 | |
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) |
2020-03-12 16:35 | derick | Category | Usage problems (Wrong Results) => Variable Display |
2020-03-12 16:38 | derick | Category | Variable Display => Uncategorized |