View Issue Details

IDProjectCategoryView StatusLast Update
0001532XdebugStep Debuggingpublic2018-03-07 13:09
Reporterpilif Assigned Toderick  
Status closedResolutionfixed 
PlatformDebian LinuxOSDebian LinuxOS Version9
Product Version2.6.0 
Target Version2.6.1Fixed in Version2.6.1 
Summary0001532: SIGABRT when using remote debugging and an error is thrown in eval()

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);');


XDEBUG_CONFIG="idekey=something" php test.php

Expected results: no crash
Actual result: the interpreter is killed with a SIGABRT

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.

TagsNo tags attached.
Operating SystemReproducible every time in Debian 9 and macOS 10.13
PHP Version7.2.0-7.2.4


has duplicate 0001545 resolvedderick Script using notice-generating eval crashes with trap 6 



2018-03-06 20:32

reporter   ~0004610

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.


2018-03-07 13:09

administrator   ~0004611

Fixed through a PR ( by the reporter. Thanks Philip!

Issue History

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