View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001532 | Xdebug | Step Debugging | public | 2018-03-06 18:28 | 2018-03-07 13:09 |
Reporter | pilif | Assigned To | derick | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Debian Linux | OS | Debian Linux | OS Version | 9 |
Product Version | 2.6.0 | ||||
Target Version | 2.6.1 | Fixed in Version | 2.6.1 | ||
Summary | 0001532: SIGABRT when using remote debugging and an error is thrown in eval() | ||||
Description | When using remote debugging and eval()ed code causes any kind of PHP error to be triggered, the interpreter will be killed by a SIGABRT because Xdebug is calling free() on a string literal. | ||||
Steps To Reproduce | Given the following test script: <?php eval('trigger_error("flupp", E_USER_NOTICE);'); run XDEBUG_CONFIG="idekey=something" php test.php Expected results: no crash | ||||
Additional Information | The bug is in xdebug_dbgp_notification() in xdebug_handler_dbgp.c where in case of eval, xdebug_xml_add_attribute_ex() is called with the "free_name" parameter set to 1, but the attribute name is a string literal, so the later called xdebug_xml_node_dtor() will try to free that literal which doesn't fly in later versions of the C library. | ||||
Tags | No tags attached. | ||||
Operating System | Reproducible every time in Debian 9 and macOS 10.13 | ||||
PHP Version | 7.2.0-7.2.4 | ||||
|
note: in order to trigger the bug, you have to use a dbgp client that announces support for notifications. Otherwise xdebug doesn't report the error and thus doesn't trigger the crash. |
|
Fixed through a PR (https://github.com/xdebug/xdebug/pull/417) by the reporter. Thanks Philip! |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-03-06 18:28 | pilif | New Issue | |
2018-03-06 20:32 | pilif | Note Added: 0004610 | |
2018-03-07 13:08 | derick | Fixed in Version | => 2.6.1 |
2018-03-07 13:08 | derick | Target Version | => 2.6.1 |
2018-03-07 13:09 | derick | Note Added: 0004611 | |
2018-03-07 13:09 | derick | Status | new => closed |
2018-03-07 13:09 | derick | Assigned To | => derick |
2018-03-07 13:09 | derick | Resolution | open => fixed |
2018-08-01 09:54 | derick | Relationship added | has duplicate 0001545 |
2020-03-12 16:33 | derick | Category | Remote Debugging => Step Debugging |