MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000315Xdebug(No Category)public2007-10-14 22:462007-10-25 22:44
Reportermagnus 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000315: xdebug crash when including a file that doesn't exist
DescriptionPHP version is 5.3-dev.

Code to reproduce:
<?php
include 'doesnt-exist.php';
?>
Additional InformationWarning: include(): Failed opening 'bar.php' for inclusion (include_path='.:/usr/local/www/php/5_3-pdo/lib/php') in /tmp/xdebug/test.php on line 3

Call Stack:
    0.0002 49064 1. {main}() /tmp/xdebug/test.php:0


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218324272 (LWP 13700)]
0xb757a580 in xdebug_compile_file (file_handle=0xbfaf1ec4, type=2) at /tmp/xdebug/xdebug.c:2427
2427 op_array->reserved[XG(reserved_offset)] = 0;
(gdb) bt
#0 0xb757a580 in xdebug_compile_file (file_handle=0xbfaf1ec4, type=2) at /tmp/xdebug/xdebug.c:2427
#1 0x082f0752 in compile_filename (type=2, filename=0x85c9a7c) at /mnt/data4/data5/php/5.3/Zend/zend_language_scanner.l:445
0000002 0x08347a50 in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER (execute_data=0xbfaf2028) at /mnt/data4/data5/php/5.3/Zend/zend_vm_execute.h:1763
0000003 0x083411b3 in execute (op_array=0x85c980c) at /mnt/data4/data5/php/5.3/Zend/zend_vm_execute.h:87
0000004 0xb7577a9d in xdebug_execute (op_array=0x85c980c) at /tmp/xdebug/xdebug.c:1534
0000005 0x0831add6 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /mnt/data4/data5/php/5.3/Zend/zend.c:1137
0000006 0x082c28a0 in php_execute_script (primary_file=0xbfaf443c) at /mnt/data4/data5/php/5.3/main/main.c:2006
0000007 0x083d2ac6 in main (argc=2, argv=0xbfaf45c4) at /mnt/data4/data5/php/5.3/sapi/cli/php_cli.c:1140
#0 0xb757a580 in xdebug_compile_file (file_handle=0xbfaf1ec4, type=2) at /tmp/xdebug/xdebug.c:2427
        op_array = (zend_op_array *) 0x0
#1 0x082f0752 in compile_filename (type=2, filename=0x85c9a7c) at /mnt/data4/data5/php/5.3/Zend/zend_language_scanner.l:445
        file_handle = {type = 0 '\0', filename = 0x85cacf4 "bar.php", opened_path = 0x0, handle = {fd = 0, fp = 0x0, stream = {handle = 0x0, reader = 0xcae20add, closer = 0x85c9920, fteller = 0xb781c12c, interactive = 140500120}},
  free_filename = 0 '\0'}
        tmp = {value = {lval = 17, dval = -2.5476481892965464e-41, str = {val = 0x11 <Address 0x11 out of bounds>, len = -1216233176}, ht = 0x11, obj = {handle = 17, handlers = 0xb781c128}}, refcount__gc = 140500160,
  type = 192 '�', is_ref__gc = 0 '\0', idx_type = 0 '\0'}
        retval = (zend_op_array *) 0x0
        opened_path = 0x0
0000002 0x08347a50 in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER (execute_data=0xbfaf2028) at /mnt/data4/data5/php/5.3/Zend/zend_vm_execute.h:1763
        opline = (zend_op *) 0x85c9a60
        new_op_array = (zend_op_array *) 0x0
        original_return_value = (zval **) 0xbfaf2168
        return_value_used = 0
        inc_filename = (zval *) 0x85c9a7c
        tmp_inc_filename = {value = {lval = 137624050, dval = 2.1649994015981752e-268, str = {
      val = 0x833f9f2 "U\211�\203�\b\213E\b\213@0\205�t\016\213E\b\213P0\213E\f\211\004$����U\211�\203�\b\213E\b\213@4\205�t\016\213E\b\213P4\213E\f\211\004$����U\211�\201�\b\001", len = 140285964}, ht = 0x833f9f2, obj = {
      handle = 137624050, handlers = 0x85c980c}}, refcount__gc = 3076127740, type = 252 '�', is_ref__gc = 251 '�', idx_type = 89 'Y'}
        failure_retval = 0 '\0'
0000003 0x083411b3 in execute (op_array=0x85c980c) at /mnt/data4/data5/php/5.3/Zend/zend_vm_execute.h:87
        execute_data = {opline = 0x85c9a60, function_state = {function = 0x85c980c}, fbc = 0x0, called_scope = 0x0, op_array = 0x85c980c, object = 0x0, Ts = 0xbfaf1ff0, CVs = 0xbfaf1fe0, original_in_execution = 0 '\0',
  symbol_table = 0x84bc430, prev_execute_data = 0x0, old_error_reporting = 0x0}
0000004 0xb7577a9d in xdebug_execute (op_array=0x85c980c) at /tmp/xdebug/xdebug.c:1534
        dummy = (zval **) 0x82fb92e
        edata = (zend_execute_data *) 0x0
        fse = (function_stack_entry *) 0x85fdc20
        xfse = (function_stack_entry *) 0x849faac
        magic_cookie = 0x0
        do_return = 0
        function_nr = 0
        le = (xdebug_llist_element *) 0xbfaf20f8
        eval_id = 0
0000005 0x0831add6 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /mnt/data4/data5/php/5.3/Zend/zend.c:1137
        files = 0xbfaf21a4 ""
        i = 1
        file_handle = (zend_file_handle *) 0xbfaf443c
        orig_op_array = (zend_op_array *) 0x0
        orig_retval_ptr_ptr = (zval **) 0x0
        local_retval = (zval *) 0x0
TagsNo tags attached.
Operating SystemKubuntu 7.04
PHP Version5.2-dev
Attached Files

- Relationships
has duplicate 0000326resolvedderick include() on non-existant file crashes xdebug with a segmentation fault 

-  Notes
(0000752)
mhorvath (reporter)
2007-10-22 19:07

Same here!

Funny thing, the segmentation fault is being produced here:

Core was generated by `/opt/php-5.2.4/bin/php -d safe_mode=Off /opt/php/bin/phpunit --report=/tmp --ve'.
Program terminated with signal 11, Segmentation fault.
#0 0x00002afc5598a207 in prefill_from_oparray (fse=0x2c80270, fn=0x2ea2cd0 "/data/bamboo/build-dir/PHX-TRUNK/Tests/UnitTests/Libraries/Phx/Controller/Dispatcher/NoClass.php", opa=0x2bb64c0)
    at /tmp/pear/cache/xdebug-2.0.0/xdebug_code_coverage.c:240
240 if (opa->opcodes[opa->size - 4].opcode == ZEND_RAISE_ABSTRACT_ERROR)
(0000758)
derick (administrator)
2007-10-25 09:39

This patch should fix it:
http://pastebin.ca/748874 [^]
(0000759)
derick (administrator)
2007-10-25 22:44

Fixed in CVS.

- Issue History
Date Modified Username Field Change
2007-10-14 22:46 magnus New Issue
2007-10-22 19:07 mhorvath Note Added: 0000752
2007-10-25 09:39 derick Note Added: 0000758
2007-10-25 22:44 derick Status new => closed
2007-10-25 22:44 derick Note Added: 0000759
2007-10-26 15:11 derick Relationship added has duplicate 0000326
2016-07-31 13:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 13:35 derick Category debugclient (debugging tool) => (No Category)


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker