View Issue Details

IDProjectCategoryView StatusLast Update
0000348XdebugUncategorizedpublic2009-11-22 20:00
ReporterAbalamAssigned Toderick 
PrioritynormalSeveritytrivialReproducibilityalways
Status resolvedResolutionunable to reproduce 
Product Version 
Target VersionFixed in Version 
Summary0000348: Wrong count of code coverage dead code (not executed lines) with Xdebug 2.0.2
DescriptionI've 4 Gentoo servers, all have the same configuration.

I've isolated the test with only 2 PHP files :

toto.php :
<?

class bobi {
function bordel() {
        echo 'ah';

// hop

        echo "toto";
}
}
?>


And cover.php :
<?
xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);

require_once 'toto.php';

print_r(xdebug_get_code_coverage());
xdebug_stop_code_coverage();
//phpinfo();
die();
?>


When i try :
php ./cover.php

I've this result on 3 servers :
Array
(
    [/home/user/toto.php] => Array
        (
            [3] => 1
            [5] => -1
            [9] => -1
            [10] => -1
            [14] => 1
        )

    [/home/user/cover.php] => Array
        (
            [4] => 1
            [6] => 1
        )

)



But on the fourth i've a wrong result :
Array
(
    [/home/user/toto.php] => Array
        (
            [3] => 1
            [13] => 1
        )

    [/home/user/cover.php] => Array
        (
            [4] => 1
            [6] => 1
        )

)

Additional InformationAll servers are gentoo, with this compile args for php :
[ebuild R ] dev-lang/php-5.2.5-r1 USE="apache2 bcmath berkdb bzip2 calendar cli crypt exif ftp gd gdbm hash iconv imap ipv6 json mysql mysqli ncurses nls pcntl pcre readline reflection session simplexml sockets spell spl ssl tidy tokenizer truetype unicode xml xmlreader xmlrpc xmlwriter xsl zip zlib -adabas -birdstep -cdb -cgi -cjk -concurrentmodphp -ctype -curl -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -fastbuild -fdftk -filter -firebird -flatfile -force-cgi-redirect -frontbase -gd-external -gmp -inifile -interbase -iodbc (-java-external) -kerberos -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -oci8 -oci8-instant-client -odbc -pdo -pic -posix -postgres -qdbm -recode -sapdb -sharedext -sharedmem -snmp -soap -solid -sqlite -suhosin -sybase -sybase-ct -sysvipc -threads -wddx -xpm -yaz -zip-external" 0 kB



Here are the php versions of the 3 good servers :
PHP 5.2.5-pl1-gentoo (cli) (built: Dec 29 2007 15:26:08)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with Xdebug v2.0.2, Copyright (c) 2002-2007, by Derick Rethans

And here is the "php -v" for the bad server :
PHP 5.2.5-pl1-gentoo (cli) (built: Jan 14 2008 23:17:29)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with Xdebug v2.0.2, Copyright (c) 2002-2007, by Derick Rethans
in xdebug_profiler_output_aggr_data() with 0 entries

Note the last line above... I think it's a weird bug isn't it ?
Anyone can explain a bug in "php -v" ???
TagsNo tags attached.
Operating System
PHP Version5.2.5

Activities

derick

2009-03-28 17:34

administrator   ~0000933

I can't reproduce, I get the correct output. I can only image that there *must* be something different with the 4th server. Perhaps you've some sort of optimizer loaded?

Issue History

Date Modified Username Field Change
2008-01-14 23:49 Abalam New Issue
2009-03-28 17:34 derick Note Added: 0000933
2009-03-28 17:34 derick Status new => feedback
2009-11-22 20:00 derick Status feedback => resolved
2009-11-22 20:00 derick Resolution open => unable to reproduce
2009-11-22 20:00 derick Assigned To => derick
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