MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001331XdebugUsage problems (Wrong Results)public2016-07-23 12:542016-11-12 16:53
Reportermajkel 
Assigned Toderick 
PriorityhighSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSUbuntuOS Version16.04
Product Version2.4.1 
Target VersionFixed in Version2.5.0RC1 
Summary0001331: Segfault in code coverage
Descriptionhttps://bugs.php.net/bug.php?id=72580 [^]
TagsNo tags attached.
Operating System
PHP Version7.0.0-7.0.4
Attached Files

- Relationships
has duplicate 0001350resolvedderick Segmentation Fault on Code Coverage 

-  Notes
(0003673)
derick (administrator)
2016-08-10 16:20

Reproduce case:

git clone git@github.com:majkel89/dbase.git
cd dbase
git checkout 735f7862f03d9a3a8a0480ae6432a210692166ba
composer install -o
./vendor/bin/phpunit
(0003701)
derick (administrator)
2016-09-08 19:30

ashgenesis, I can reproduce this problem. But there are many many tests, that are just in the way. Can you help trying to figure out which one causes it? It would be great, if you could do this on the shell first before you try:

export USE_ZEND_ALLOC=0
(0003702)
ashgenesis (reporter)
2016-09-09 10:24

derick I have found that this is the test which fail

File tests/unit/FormatTest.php
Class FormatTest method testInsertTransaction ligne 867

    public function testInsertTransaction() {
        $format = $this->getFormatMock()
            ->getHeader(new Header())
            ->writeHeader(array(), self::never())
            ->serializeRecord()
            ->getFile($this->getFileMock()->new())
            ->new();
        $this->reflect($format)->transaction = true;
        $format->insert(new Record());
    }
(0003703)
derick (administrator)
2016-09-09 11:09

Yeah, that seems to be the one. I think I know *why* it happens too. It has to do with the mock and its use of __call.
(0003705)
derick (administrator)
2016-09-11 11:56

Think I have this cracked, can you check the following branch to confirm?

 https://github.com/derickr/xdebug/tree/issue1331-code-coverage-segfault [^]
(0003708)
ashgenesis (reporter)
2016-09-19 14:06

derick I tried you branch and it seem fixing the segfault

./vendor/bin/phpunit tags/v1.0.0~10
PHPUnit 4.7.7 by Sebastian Bergmann and contributors.

Runtime: PHP 7.0.10-1+deb.sury.org~trusty+1 with Xdebug 2.4.1-dev
Configuration: /var/www/dev/dbase/phpunit.xml

............................................................... 63 / 318 ( 19%)
............................................................... 126 / 318 ( 39%)
............................................................... 189 / 318 ( 59%)
............................................................... 252 / 318 ( 79%)
............................................................... 315 / 318 ( 99%)
...

Time: 8.61 seconds, Memory: 14.00MB

OK (318 tests, 611 assertions)

Generating code coverage report in HTML format ... done

No more segfault with your branch.

Thanks

- Issue History
Date Modified Username Field Change
2016-07-23 12:54 majkel New Issue
2016-07-31 13:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 13:35 derick Category debugclient (debugging tool) => (No Category)
2016-08-10 16:20 derick Note Added: 0003673
2016-08-10 16:20 derick Category (No Category) => Usage problems (Wrong Results)
2016-08-10 16:20 derick Product Version 2.4.0 => 2.4.1
2016-09-08 19:30 derick Note Added: 0003701
2016-09-09 10:24 ashgenesis Note Added: 0003702
2016-09-09 11:09 derick Note Added: 0003703
2016-09-11 11:56 derick Note Added: 0003705
2016-09-11 11:56 derick Assigned To => derick
2016-09-11 11:56 derick Status new => feedback
2016-09-19 14:06 ashgenesis Note Added: 0003708
2016-10-04 20:21 derick Relationship added has duplicate 0001350
2016-10-07 20:04 derick Status feedback => closed
2016-10-07 20:04 derick Resolution open => fixed
2016-10-07 20:04 derick Fixed in Version => 2.4.2
2016-11-12 16:53 derick Fixed in Version 2.4.2 => 2.5.0RC1


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker