Downgrading to PHPUnit 4.1.2 helped and the error disappeared. I was accidentally on the development branch of 4.2.
This afternoon I encountered a very strange error "zend_mm_heap corrupted" from the PHP runtime after running a full project testsuite with PHPUnit.
As you can see from the screenshot above, the whole test suite completes fine. However the PHP process itself crashes making the exit code of the run be non-zero (and eventually failing the Jenkins build).
Google revealed many articles related to the error, but none of them actually were similar to my issue. Stack Overflow has a bunch of different solutions that have worked for developers struggling with this very random error:
- Increase php.ini's
zend.enable_gc = 0
assert.active = 0
I found one interesting post at PHP Freaks forum stating that by tweaking some environment variables we could modify the behavior of PHP memory management
*** Error in `php': double free or corruption (!prev): 0x0995b660 ***
*** Error in `php': double free or corruption (!prev): 0x0a17a6b0 ***
The new error message is not that much clearer than previous one. So, it really seems I've hit some very strange bug somewhere, just don't know where.