View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001665 | Xdebug | Step Debugging | public | 2019-05-13 14:01 | 2019-10-31 10:44 |
Reporter | Xenos | Assigned To | derick | ||
Priority | high | Severity | block | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 2.8.0dev | Fixed in Version | 2.8.0 | ||
Summary | 0001665: Segfault when overriding a function object parameter + collect_params > 0 | ||||
Description | Hi, The remote debug functionnality of XDebug crashs (segfault 11) in the provided example, whith collect_params = 0 I will give a look at xdebug code and try to fix this issue, but I want to report it so you can try to reproduce the issue too. I suspect some other segfault tickets are duplicates of this one, but I'm providing lightest test case I could find | ||||
Steps To Reproduce |
Running this on XDebug 2.6.1 (PHP 7.1.16 Windows) or 2.7.0 (php 7.3.3 Windows or Linux) with the option "xdebug.collect_params > 0" (ie 1, 2, 3 etc) generates a segfault. With collect_params = 0, there is no segfault | ||||
Additional Information | When we don't override the value of the $var object parameter, then there is no segfault
When overriding the value with another object (instead of a scalar) there is a segfault:
When not using a function like below, there is no segfault
When using an array, there is no segfault:
When using a scalar, there is no segfault either:
| ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 7.3.0-7.3.1 | ||||
|
Note that the segfault can be triggered from command line (using the php -f testcase.phpcommand) so no need for Apache, PDO, whatever |
|
I've made a (very messy) pull request addressing that https://github.com/xdebug/xdebug/pull/472 Once I make it work on PHP 7/7.1/7.2 (tests seems to fail because of GC_DELREF), I'll close it, and reopen it following properly the "contribute" guidelines (issue1665 branch name, forking xdebug_2_7, and with a single commit instead of 6-7 because I was afraid of loosing things by accident : ) ) |
|
This has been fixed for Xdebug 2.8-dev (likely to become 2.8.0RC1). Thanks for the initial PR and test cases! |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-05-13 14:01 | Xenos | New Issue | |
2019-05-13 15:15 | Xenos | Note Added: 0005021 | |
2019-05-15 13:59 | Xenos | Note Added: 0005022 | |
2019-06-28 11:15 | derick | Status | new => confirmed |
2019-06-28 11:15 | derick | Product Version | 2.7.0 => 2.8.0dev |
2019-06-28 11:15 | derick | Product Version | 2.8.0dev => |
2019-06-28 11:15 | derick | Target Version | => 2.8.0dev |
2019-06-28 11:18 | derick | Relationship added | has duplicate 0001535 |
2019-06-28 11:50 | derick | Relationship added | has duplicate 0001651 |
2019-09-06 11:10 | derick | Assigned To | => derick |
2019-09-06 11:10 | derick | Status | confirmed => closed |
2019-09-06 11:10 | derick | Resolution | open => fixed |
2019-09-06 11:10 | derick | Fixed in Version | => 2.8.0dev |
2019-09-06 11:10 | derick | Note Added: 0005134 | |
2019-10-31 10:44 | derick | Fixed in Version | 2.8.0dev => 2.8.0 |
2020-03-12 16:33 | derick | Category | Remote Debugging => Step Debugging |