View Issue Details

IDProjectCategoryView StatusLast Update
0001352XdebugUsage problems (Wrong Results)public2016-11-23 10:16
ReportersebastianAssigned Toderick 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionno change required 
Platformx86_64OSLinuxOS Version4.7.5-200.fc24
Product Version 
Target VersionFixed in Version 
Summary0001352: Segfault when running phpunit-mock-objects test suite
DescriptionXdebug 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
PHPUnit 5.6.1 by Sebastian Bergmann and contributors.

Generating phpunit.xml in /usr/local/src/phpunit-mock-objects

Bootstrap script (relative to path shown above; default: vendor/autoload.php):
Tests directory (relative to path shown above; default: tests):
Source directory (relative to path shown above; default: src):

Generated phpunit.xml in /usr/local/src/phpunit-mock-objects

$ gdb php
GNU gdb (GDB) Fedora 7.11.1-86.fc24
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from php...Reading symbols from /usr/lib/debug/usr/bin/php.debug...done.
done.
(gdb) r ./vendor/bin/phpunit
Starting program: /usr/bin/php ./vendor/bin/phpunit
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Detaching after fork from child process 108226.
PHPUnit 5.6.1 by Sebastian Bergmann and contributors.

Runtime: PHP 7.1.0RC3 with Xdebug 2.5.0-dev
Configuration: /usr/local/src/phpunit-mock-objects/phpunit.xml

...............R.R................R......R.....RR...RR......... 63 / 118 ( 53%)
RR...
Program received signal SIGSEGV, Segmentation fault.
zend_vm_stack_free_args (call=<optimized out>) at /usr/src/debug/php-7.1.0RC3/Zend/zend_execute.h:246
246 if (Z_REFCOUNTED_P(p)) {
(gdb) bt
#0 zend_vm_stack_free_args (call=<optimized out>) at /usr/src/debug/php-7.1.0RC3/Zend/zend_execute.h:246
#1 cleanup_unfinished_calls (op_num=op_num@entry=4, execute_data=<optimized out>, execute_data=<optimized out>) at /usr/src/debug/php-7.1.0RC3/Zend/zend_execute.c:2458
0000002 0x000055555584d41f in ZEND_HANDLE_EXCEPTION_SPEC_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1780
0000003 0x00005555557f32ab in execute_ex (ex=ex@entry=0x555555bb25e8 <executor_globals+904>) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000004 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x555555bb25e8 <executor_globals+904>) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000005 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3818d50) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000006 0x000055555584baee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1076
0000007 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7fffe27ba260) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000008 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7fffe27ba260) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000009 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff38189c0) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000010 0x000055555584baee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1076
0000011 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7fffe26b2500) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000012 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7fffe26b2500) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000013 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff38187f0) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000014 0x000055555584baee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1076
0000015 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7fffe245aea0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000016 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7fffe245aea0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000017 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3818610) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000018 0x000055555584baee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1076
0000019 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7fffe2689640) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000020 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7fffe2689640) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000021 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3818350) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000022 0x000055555579aa0a in zend_call_function (fci=fci@entry=0x7fffffff9760, fci_cache=<optimized out>, fci_cache@entry=0x7fffffff9730) at /usr/src/debug/php-7.1.0RC3/Zend/zend_execute_API.c:826
0000023 0x00005555556926b9 in reflection_method_invoke (execute_data=<optimized out>, return_value=0x7ffff3817fb0, variadic=0) at /usr/src/debug/php-7.1.0RC3/ext/reflection/php_reflection.c:3310
0000024 0x0000555555798e2a in dtrace_execute_internal (execute_data=<optimized out>, return_value=<optimized out>) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:107
0000025 0x00007fffecb0d4a2 in xdebug_execute_internal (current_execute_data=0x7ffff38182e0, return_value=0x7ffff3817fb0) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:2048
0000026 0x000055555584ba1c in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1099
0000027 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff3982800) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000028 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff3982800) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000029 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3817db0) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000030 0x000055555584baee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1076
0000031 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff398ab60) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000032 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff398ab60) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000033 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3817550) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000034 0x000055555584c07c in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:949
#35 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7fffe271a7e0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000036 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7fffe271a7e0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000037 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3816730) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000038 0x000055555584c07c in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:949
0000039 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff39892c0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000040 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff39892c0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000041 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3815ca0) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000042 0x000055555584c07c in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:949
0000043 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff39331c0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000044 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff39331c0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000045 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3815610) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000046 0x000055555584c07c in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:949
0000047 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff39331c0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000048 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff39331c0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
#49 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3814f80) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000050 0x000055555584c07c in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:949
#51 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7fffe26e6b60) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000052 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7fffe26e6b60) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000053 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3813790) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000054 0x000055555584baee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1076
0000055 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff38e6240) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000056 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff38e6240) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000057 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3813260) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000058 0x000055555584baee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1076
0000059 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff38655e0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000060 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff38655e0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000061 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3813190) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000062 0x000055555584c07c in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:949
0000063 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff38949e0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000064 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff38949e0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000065 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3813030) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000066 0x000055555584e058 in zend_execute (op_array=op_array@entry=0x7ffff386f1c0, return_value=return_value@entry=0x0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:474
0000067 0x00005555557a9bc3 in zend_execute_scripts (type=type@entry=8, retval=retval@entry=0x0, file_count=file_count@entry=3) at /usr/src/debug/php-7.1.0RC3/Zend/zend.c:1464
0000068 0x0000555555746f50 in php_execute_script (primary_file=0x7fffffffca70) at /usr/src/debug/php-7.1.0RC3/main/main.c:2533
0000069 0x00005555558502bc in do_cli (argc=2, argv=0x555555bca260) at /usr/src/debug/php-7.1.0RC3/sapi/cli/php_cli.c:990
0000070 0x000055555562383a in main (argc=2, argv=0x555555bca260) at /usr/src/debug/php-7.1.0RC3/sapi/cli/php_cli.c:1378
Additional InformationNo segfault when Xdebug is not loaded:

$ ./vendor/bin/phpunit
PHPUnit 5.6.1 by Sebastian Bergmann and contributors.

Runtime: PHP 7.1.0RC3
Configuration: /usr/local/src/phpunit-mock-objects/phpunit.xml

...............R.R................R......R.....RR...RR......... 63 / 118 ( 53%)
RR...E...................................RR..R......... 118 / 118 (100%)

Time: 38 ms, Memory: 6.00MB

There was 1 error:

1) Framework_MockObjectTest::testFunctionCallback
call_user_func_array() expects parameter 1 to be a valid callback, function 'functionCallback' not found or invalid function name

/usr/local/src/phpunit-mock-objects/tests/MockObjectTest.php:275

--

There were 13 risky tests:

1) Framework_MockObject_GeneratorTest::testCanImplementInterfacesThatHaveMethodsWithReturnTypes
This test did not perform any assertions

2) Framework_MockObject_GeneratorTest::testCanInvokeMethodsOfNonExistentClass
This test did not perform any assertions

3) Framework_MockObject_Invocation_ObjectTest::testConstructorRequiresClassAndMethodAndParametersAndObject
This test did not perform any assertions

4) Framework_MockObject_Invocation_StaticTest::testConstructorRequiresClassAndMethodAndParameters
This test did not perform any assertions

5) Framework_MockObject_Matcher_ConsecutiveParametersTest::testIntegration
This test did not perform any assertions

6) Framework_MockObject_Matcher_ConsecutiveParametersTest::testIntegrationWithLessAssertionsThanMethodCalls
This test did not perform any assertions

7) Framework_MockObjectTest::testMockedMethodIsNotCalledWhenExpectsAnyWithParameter
This test did not perform any assertions

8) Framework_MockObjectTest::testMockedMethodIsNotCalledWhenMethodSpecifiedDirectlyWithParameter
This test did not perform any assertions

9) Framework_MockObjectTest::testStubbedException
This test did not perform any assertions

10) Framework_MockObjectTest::testStubbedWillThrowException
This test did not perform any assertions

11) Framework_MockObjectTest::testMockArgumentsPassedByReference3
This test did not perform any assertions

12) Framework_MockObjectTest::testMockArgumentsPassedByReference4
This test did not perform any assertions

13) Framework_MockObjectTest::testCreateTwoMocksOfOneWsdlFile
This test did not perform any assertions

ERRORS!
Tests: 118, Assertions: 161, Errors: 1, Risky: 13.
TagsNo tags attached.
Operating System
PHP Version7.1-dev

Activities

sebastian

2016-10-09 06:07

reporter   ~0003718

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
GNU gdb (GDB) Fedora 7.11.1-86.fc24
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> [^]
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>. [^]
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>. [^]
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from php...Reading symbols from /usr/lib/debug/usr/bin/php.debug...done.
done.
(gdb) r ./vendor/bin/phpunit --no-configuration --bootstrap vendor/autoload.php tests
Starting program: /usr/bin/php ./vendor/bin/phpunit
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Detaching after fork from child process 108226.
PHPUnit 5.6.1 by Sebastian Bergmann and contributors.

Runtime: PHP 7.1.0RC3 with Xdebug 2.5.0-dev
Configuration: /usr/local/src/phpunit-mock-objects/phpunit.xml

...............R.R................R......R.....RR...RR......... 63 / 118 ( 53%)
RR...
Program received signal SIGSEGV, Segmentation fault.
zend_vm_stack_free_args (call=<optimized out>) at /usr/src/debug/php-7.1.0RC3/Zend/zend_execute.h:246
246 if (Z_REFCOUNTED_P(p)) {
(gdb) bt
#0 zend_vm_stack_free_args (call=<optimized out>) at /usr/src/debug/php-7.1.0RC3/Zend/zend_execute.h:246
#1 cleanup_unfinished_calls (op_num=op_num@entry=4, execute_data=<optimized out>, execute_data=<optimized out>) at /usr/src/debug/php-7.1.0RC3/Zend/zend_execute.c:2458
0000002 0x000055555584d41f in ZEND_HANDLE_EXCEPTION_SPEC_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1780
0000003 0x00005555557f32ab in execute_ex (ex=ex@entry=0x555555bb25e8 <executor_globals+904>) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000004 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x555555bb25e8 <executor_globals+904>) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000005 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3818d50) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000006 0x000055555584baee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1076
0000007 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7fffe27ba260) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000008 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7fffe27ba260) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000009 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff38189c0) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000010 0x000055555584baee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1076
0000011 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7fffe26b2500) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000012 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7fffe26b2500) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000013 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff38187f0) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000014 0x000055555584baee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1076
0000015 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7fffe245aea0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000016 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7fffe245aea0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000017 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3818610) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000018 0x000055555584baee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1076
0000019 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7fffe2689640) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000020 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7fffe2689640) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000021 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3818350) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000022 0x000055555579aa0a in zend_call_function (fci=fci@entry=0x7fffffff9760, fci_cache=<optimized out>, fci_cache@entry=0x7fffffff9730) at /usr/src/debug/php-7.1.0RC3/Zend/zend_execute_API.c:826
0000023 0x00005555556926b9 in reflection_method_invoke (execute_data=<optimized out>, return_value=0x7ffff3817fb0, variadic=0) at /usr/src/debug/php-7.1.0RC3/ext/reflection/php_reflection.c:3310
0000024 0x0000555555798e2a in dtrace_execute_internal (execute_data=<optimized out>, return_value=<optimized out>) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:107
0000025 0x00007fffecb0d4a2 in xdebug_execute_internal (current_execute_data=0x7ffff38182e0, return_value=0x7ffff3817fb0) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:2048
0000026 0x000055555584ba1c in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1099
0000027 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff3982800) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000028 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff3982800) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000029 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3817db0) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000030 0x000055555584baee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1076
0000031 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff398ab60) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000032 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff398ab60) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000033 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3817550) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000034 0x000055555584c07c in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:949
#35 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7fffe271a7e0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000036 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7fffe271a7e0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000037 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3816730) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000038 0x000055555584c07c in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:949
0000039 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff39892c0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000040 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff39892c0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000041 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3815ca0) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000042 0x000055555584c07c in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:949
0000043 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff39331c0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000044 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff39331c0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000045 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3815610) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000046 0x000055555584c07c in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:949
0000047 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff39331c0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000048 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff39331c0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
#49 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3814f80) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000050 0x000055555584c07c in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:949
#51 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7fffe26e6b60) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000052 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7fffe26e6b60) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000053 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3813790) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000054 0x000055555584baee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1076
0000055 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff38e6240) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000056 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff38e6240) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000057 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3813260) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000058 0x000055555584baee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:1076
0000059 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff38655e0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000060 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff38655e0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000061 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3813190) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000062 0x000055555584c07c in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:949
0000063 0x00005555557f32ab in execute_ex (ex=ex@entry=0x7ffff38949e0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:429
0000064 0x0000555555798dc8 in dtrace_execute_ex (execute_data=0x7ffff38949e0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_dtrace.c:83
0000065 0x00007fffecb0cc0f in xdebug_execute_ex (execute_data=0x7ffff3813030) at /usr/src/debug/php-pecl-xdebug-2.5.0/NTS/xdebug.c:1900
0000066 0x000055555584e058 in zend_execute (op_array=op_array@entry=0x7ffff386f1c0, return_value=return_value@entry=0x0) at /usr/src/debug/php-7.1.0RC3/Zend/zend_vm_execute.h:474
0000067 0x00005555557a9bc3 in zend_execute_scripts (type=type@entry=8, retval=retval@entry=0x0, file_count=file_count@entry=3) at /usr/src/debug/php-7.1.0RC3/Zend/zend.c:1464
0000068 0x0000555555746f50 in php_execute_script (primary_file=0x7fffffffca70) at /usr/src/debug/php-7.1.0RC3/main/main.c:2533
0000069 0x00005555558502bc in do_cli (argc=2, argv=0x555555bca260) at /usr/src/debug/php-7.1.0RC3/sapi/cli/php_cli.c:990
0000070 0x000055555562383a in main (argc=2, argv=0x555555bca260) at /usr/src/debug/php-7.1.0RC3/sapi/cli/php_cli.c:1378

sebastian

2016-10-09 06:13

reporter   ~0003719

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.

derick

2016-10-17 17:16

administrator   ~0003724

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
==5388== Memcheck, a memory error detector
==5388== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==5388== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info
==5388== Command: php -n vendor/bin/phpunit
==5388==
PHPUnit 5.6.1 by Sebastian Bergmann and contributors.

Runtime: PHP 7.1.0-dev
Configuration: /tmp/phpunit-mock-objects/phpunit.xml

...............R.R................R......R.....RR...RR......... 63 / 118 ( 53%)
RR...==5388== Conditional jump or move depends on uninitialised value(s)
==5388== at 0xAC1E0A: cleanup_unfinished_calls (zend_execute.c:2391)
==5388== by 0xAC7110: ZEND_HANDLE_EXCEPTION_SPEC_HANDLER (zend_vm_execute.h:1780)
==5388== by 0xAC326A: execute_ex (zend_vm_execute.h:429)
==5388== by 0xA4CF96: zend_call_function (zend_execute_API.c:826)
==5388== by 0x7FA8EB: reflection_method_invoke (php_reflection.c:3316)
==5388== by 0x7FAA7A: zim_reflection_method_invokeArgs (php_reflection.c:3352)
==5388== by 0xAC4E10: ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:1097)
==5388== by 0xAC326A: execute_ex (zend_vm_execute.h:429)
==5388== by 0xAC337B: zend_execute (zend_vm_execute.h:474)
==5388== by 0xA64798: zend_execute_scripts (zend.c:1464)
==5388== by 0x9D3A33: php_execute_script (main.c:2533)
==5388== by 0xB449A3: do_cli (php_cli.c:990)
==5388==
E...................................RR..R......... 118 / 118 (100%)

Time: 12.43 seconds, Memory: 6.00MB

derick

2016-10-18 10:48

administrator   ~0003726

Besides this crash, it also found another bug: https://bugs.php.net/bug.php?id=73337

derick

2016-10-18 10:54

administrator   ~0003727

And the original issue has a bug report now too:
https://bugs.php.net/bug.php?id=73338

derick

2016-11-16 21:20

administrator   ~0003753

This should be fixed in the latest PHP 7.0.x/PHP 7.1RCx releases. Can you please check?

derick

2016-11-22 23:27

administrator   ~0003778

Ping?

sebastian

2016-11-23 06:18

reporter   ~0003784

I can no longer reproduce this.

derick

2016-11-23 10:16

administrator   ~0003786

This was a bug in PHP.

Issue History

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