View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001352 | Xdebug | Uncategorized | public | 2016-10-09 06:04 | 2016-11-23 10:16 |
Reporter | sebastian | Assigned To | derick | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Platform | x86_64 | OS | Linux | OS Version | 4.7.5-200.fc24 |
Summary | 0001352: Segfault when running phpunit-mock-objects test suite | ||||
Description | Xdebug causes a segfault in the PHP runtime when I run the test suite for phpunit-mock-objects 3.3.1 using a specific PHPUnit configuration. Details should be clear from the "Steps To Reproduce" and "Additional Information" sections. | ||||
Steps To Reproduce | $ git clone git@github.com:sebastianbergmann/phpunit-mock-objects.git $ cd phpunit-mock-objects $ git checkout 3.3.1 $ composer install $ ./vendor/bin/phpunit --generate-configuration Generating phpunit.xml in /usr/local/src/phpunit-mock-objects Bootstrap script (relative to path shown above; default: vendor/autoload.php): Generated phpunit.xml in /usr/local/src/phpunit-mock-objects $ gdb php Runtime: PHP 7.1.0RC3 with Xdebug 2.5.0-dev ...............R.R................R......R.....RR...RR......... 63 / 118 ( 53%) | ||||
Additional Information | No segfault when Xdebug is not loaded: $ ./vendor/bin/phpunit Runtime: PHP 7.1.0RC3 ...............R.R................R......R.....RR...RR......... 63 / 118 ( 53%) Time: 38 ms, Memory: 6.00MB There was 1 error: 1) Framework_MockObjectTest::testFunctionCallback /usr/local/src/phpunit-mock-objects/tests/MockObjectTest.php:275 -- There were 13 risky tests: 1) Framework_MockObject_GeneratorTest::testCanImplementInterfacesThatHaveMethodsWithReturnTypes 2) Framework_MockObject_GeneratorTest::testCanInvokeMethodsOfNonExistentClass 3) Framework_MockObject_Invocation_ObjectTest::testConstructorRequiresClassAndMethodAndParametersAndObject 4) Framework_MockObject_Invocation_StaticTest::testConstructorRequiresClassAndMethodAndParameters 5) Framework_MockObject_Matcher_ConsecutiveParametersTest::testIntegration 6) Framework_MockObject_Matcher_ConsecutiveParametersTest::testIntegrationWithLessAssertionsThanMethodCalls 7) Framework_MockObjectTest::testMockedMethodIsNotCalledWhenExpectsAnyWithParameter 8) Framework_MockObjectTest::testMockedMethodIsNotCalledWhenMethodSpecifiedDirectlyWithParameter 9) Framework_MockObjectTest::testStubbedException 10) Framework_MockObjectTest::testStubbedWillThrowException 11) Framework_MockObjectTest::testMockArgumentsPassedByReference3 12) Framework_MockObjectTest::testMockArgumentsPassedByReference4 13) Framework_MockObjectTest::testCreateTwoMocksOfOneWsdlFile ERRORS! | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 7.1-dev | ||||
|
Slightly simpler instructions for reproducing the issue: $ git clone git@github.com:sebastianbergmann/phpunit-mock-objects.git $ cd phpunit-mock-objects $ git checkout 3.3.1 $ composer install $ gdb php Runtime: PHP 7.1.0RC3 with Xdebug 2.5.0-dev ...............R.R................R......R.....RR...RR......... 63 / 118 ( 53%) |
|
The segfault occurs when call_user_func_array() is invoked with a callback that does not exist, in this case the name of a global function that does not exist. |
|
I don't think this is a bug in Xdebug, without it loaded (notice the -n), I also get a valgrind issue: derick@whisky:/tmp/phpunit-mock-objects $ valgrind php -n vendor/bin/phpunit Runtime: PHP 7.1.0-dev ...............R.R................R......R.....RR...RR......... 63 / 118 ( 53%) Time: 12.43 seconds, Memory: 6.00MB |
|
Besides this crash, it also found another bug: https://bugs.php.net/bug.php?id=73337 |
|
And the original issue has a bug report now too: |
|
This should be fixed in the latest PHP 7.0.x/PHP 7.1RCx releases. Can you please check? |
|
Ping? |
|
I can no longer reproduce this. |
|
This was a bug in PHP. |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-10-09 06:04 | sebastian | New Issue | |
2016-10-09 06:07 | sebastian | Note Added: 0003718 | |
2016-10-09 06:13 | sebastian | Note Added: 0003719 | |
2016-10-17 17:16 | derick | Note Added: 0003724 | |
2016-10-17 17:16 | derick | Assigned To | => derick |
2016-10-17 17:16 | derick | Status | new => feedback |
2016-10-18 10:48 | derick | Note Added: 0003726 | |
2016-10-18 10:54 | derick | Note Added: 0003727 | |
2016-11-16 21:20 | derick | Note Added: 0003753 | |
2016-11-22 23:27 | derick | Note Added: 0003778 | |
2016-11-23 06:18 | sebastian | Note Added: 0003784 | |
2016-11-23 06:18 | sebastian | Status | feedback => assigned |
2016-11-23 10:16 | derick | Note Added: 0003786 | |
2016-11-23 10:16 | derick | Status | assigned => resolved |
2016-11-23 10:16 | derick | Resolution | open => no change required |
2020-03-12 16:35 | derick | Category | Usage problems (Wrong Results) => Variable Display |
2020-03-12 16:38 | derick | Category | Variable Display => Uncategorized |