View Issue Details

IDProjectCategoryView StatusLast Update
0001117XdebugUncategorizedpublic2015-02-28 16:30
Reporterz0rc Assigned To 
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSDebianOS Version7.6
Product Version2.3.1 
Fixed in Version2.3.2 
Summary0001117: phpunit with coverage reporting under 5.5.22 crashes xdebug
Description

After upgrading from PHP 5.5.21 to 5.5.22 PHPUnit started to crash within xdebug module when used with coverage option. I tried with coverage-html and coverage-clover.

Tried with PHPUnit branches 3.7 and 4.5.

Sample output

php vendor/bin/phpunit --configuration=phpunit.xml.dist

PHPUnit 4.5.0-16-geb6ad0d by Sebastian Bergmann and contributors.

Configuration read from /var/build/total_import/staging/135/phpunit.xml.dist

Deprecated configuration setting "strict" used

....... glibc detected php: realloc(): invalid next size: 0x00000000028518a0 ***

Full GDB stack trace https://privatepaste.com/280caa3907

Interesting is that under valgrind there is no crash, but there is some nasty errors (valgrind -v --leak-check=full php vendor/bin/phpunit --configuration=phpunit.xml.dist) https://privatepaste.com/bf998591bd

Steps To Reproduce

phpunit --coverage-html

TagsNo tags attached.
Operating System
PHP Version5.5.20-5.5.25

Activities

z0rc

2015-02-26 16:06

reporter   ~0003004

Here are similar reports https://github.com/puphpet/puphpet/issues/1368

derick

2015-02-26 16:18

administrator   ~0003005

Is this with all code coverage, or just some specific ones? Could you for example make a small reproducible case (ie, one specific unit test), that shows this crash?

z0rc

2015-02-27 07:20

reporter   ~0003006

I've hit this issue with two internal projects. Will try to come up with some small testcase.

bushman

2015-02-27 12:19

reporter   ~0003012

Hi, I created reproducible case:
https://github.com/teplolog/xdebub_realloc_error/blob/master/tests/XdebugTest.php

derick

2015-02-27 12:39

administrator   ~0003013

Thanks bushman, how do I run that? Just in a dir with phpunit?

bushman

2015-02-27 12:53

reporter   ~0003014

You can install this case project by running:
git clone https://github.com/teplolog/xdebub_realloc_error.git
cd xdebub_realloc_error
composer install

And then run:
php ./vendor/bin/phpunit --configuration=phpunit.xml.dist

derick

2015-02-28 16:30

administrator   ~0003016

Thanks for the reproduce case. This is now fixed on GIT - for the 2.3.2 release.