View Issue Details

IDProjectCategoryView StatusLast Update
0000746XdebugUncategorizedpublic2012-04-27 23:56
Reporterhernst Assigned Toderick  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version2.2dev 
Fixed in Version2.1.4 
Summary0000746: crash if getting context which contain a simplexml element
Description

Hi,
while debugging with PHPStorm a script and using xdebug the debugger crashed. I narrowed down the problem to this script and the following commands:

debugclient commands:
breakpoint_set -i 1 -t line -f simplexml.php -n 10
run -i 1
context_get -i 1

Steps To Reproduce

Sample file to reproduce crash with:
<?php

$sx = simplexml_load_string(<<<XML
<?xml version="1.0" encoding="utf-8"?>
<hierarchy class="hlriskfactor"><element id="1-8"><reference class="riskfactor" refid="1" /></element>
</hierarchy>
XML
);

$i = 0;

Additional Information

#0 0x000000000067c748 in zend_hash_apply_with_arguments ()
#1 0x00007ffff1eb1ece in xdebug_var_export_xml_node (struc=0x7fffffffb018, name=0x1077120 "$sx", node=0x1071b10, options=0x1070830, level=0) at /home/dev/src/xdebug/xdebug_var.c:1138
0000002 0x00007ffff1eb22e6 in xdebug_get_zval_value_xml_node_ex (name=<value optimized out>, val=0x104d6d0, var_type=0, options=0x1070830) at /home/dev/src/xdebug/xdebug_var.c:1216
0000003 0x00007ffff1eaa071 in attach_used_var_with_contents (xml=0x1070890, he=<value optimized out>, options=0x1070830) at /home/dev/src/xdebug/xdebug_handler_dbgp.c:1947
0000004 0x00007ffff1eaa754 in xdebug_hash_apply_with_argument (h=<value optimized out>, user=0x1070890, cb=0x7ffff1eaa040 <attach_used_var_with_contents>, argument=0x1070830) at /home/dev/src/xdebug/xdebug_hash.c:261
0000005 0x00007ffff1ea9c20 in attach_context_vars (retval=0x7fffffffb1b0, context=<value optimized out>, args=<value optimized out>) at /home/dev/src/xdebug/xdebug_handler_dbgp.c:1999
0000006 xdebug_dbgp_handle_context_get (retval=0x7fffffffb1b0, context=<value optimized out>, args=<value optimized out>) at /home/dev/src/xdebug/xdebug_handler_dbgp.c:2095
0000007 0x00007ffff1ea2728 in xdebug_dbgp_parse_option (context=0x7ffff20c0e08, bail=1) at /home/dev/src/xdebug/xdebug_handler_dbgp.c:2350
0000008 xdebug_dbgp_cmdloop (context=0x7ffff20c0e08, bail=1) at /home/dev/src/xdebug/xdebug_handler_dbgp.c:2399

TagsNo tags attached.
Operating Systemlinux
PHP Version5.3.8

Activities

derick

2012-02-29 13:13

administrator   ~0001934

I believe I have fixed this on github. Could you please try the latest version from there?

derick

2012-03-16 22:11

administrator   ~0001992

Could you please test whether this works with Xdebug 2.1.4?

hernst

2012-03-17 12:05

reporter   ~0001997

tested and works with 2.1.4 and latest head on github

derick

2012-04-27 23:56

administrator   ~0002110

Closing then. Thanks for testing!

Issue History

Date Modified Username Field Change
2011-11-11 22:11 hernst New Issue
2012-02-29 13:13 derick Note Added: 0001934
2012-02-29 13:13 derick Assigned To => derick
2012-02-29 13:13 derick Status new => feedback
2012-03-16 22:11 derick Note Added: 0001992
2012-03-17 12:05 hernst Note Added: 0001997
2012-03-17 12:05 hernst Status feedback => assigned
2012-04-27 23:55 derick Fixed in Version => 2.1.4
2012-04-27 23:56 derick Note Added: 0002110
2012-04-27 23:56 derick Status assigned => closed
2012-04-27 23:56 derick Resolution open => fixed
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized