Changeset 714 in svn


Ignore:
Timestamp:
2011-04-09T03:08:38Z (4 years ago)
Author:
Xuefer
Message:

disassembler: DECLARE_INHERITED_CLASS/DELAYED class not found

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r709 r714  
    12121.3.2 2011-??-??
    1313========
     14 * disassembler: DECLARE_INHERITED_CLASS/DELAYED class not found
    1415 * disassembler: don't dump builtin functions
    1516 * fix win32 build against win32 native gnu tools
  • trunk/Decompiler.class.php

    r713 r714  
    10731073                    // }}}
    10741074                case XC_DECLARE_CLASS:
    1075                 case XC_DECLARE_INHERITED_CLASS: // {{{
     1075                case XC_DECLARE_INHERITED_CLASS:
     1076                case XC_DECLARE_INHERITED_CLASS_DELAYED: // {{{
    10761077                    $key = $op1['u.constant'];
     1078                    if (!isset($this->dc['class_table'][$key])) {
     1079                        echo 'class not found: ', $key, 'existing classes are:', "\n";
     1080                        var_dump(array_keys($this->dc['class_table']));
     1081                        exit;
     1082                    }
    10771083                    $class = &$this->dc['class_table'][$key];
    1078                     if (!isset($class)) {
    1079                         echo 'class not found: ' . $key;
    1080                         exit;
    1081                     }
    10821084                    $class['name'] = $this->unquoteName($this->getOpVal($op2, $EX));
    1083                     if ($opc == XC_DECLARE_INHERITED_CLASS) {
     1085                    if ($opc == XC_DECLARE_INHERITED_CLASS || $opc == XC_DECLARE_INHERITED_CLASS_DELAYED) {
    10841086                        $ext /= XC_SIZEOF_TEMP_VARIABLE;
    10851087                        $class['parent'] = $T[$ext];
     
    18671869    'XC_DECLARE_CLASS' => -1,
    18681870    'XC_DECLARE_INHERITED_CLASS' => -1,
     1871    'XC_DECLARE_INHERITED_CLASS_DELAYED' => -1,
    18691872    'XC_ADD_INTERFACE' => -1,
    18701873    'XC_POST_DEC_OBJ' => -1,
  • trunk/NEWS

    r703 r714  
    441.3.2 2011-??-??
    55========
     6 * memory leak on recompile
     7 * disassembler fixes and updates for new PHP
    68 * win32 build fix
    79 * improve compatibility with ionCube Loader
  • trunk/const_string_opcodes_php6.x.h

    r567 r714  
    1 /* size = 154 */
     1/* size = 157 */
    22static const char *const xc_opcode_names[] = {
    33/* 0 */ "NOP",
     
    112112/* 109 */   "FETCH_CLASS",
    113113/* 110 */   "CLONE",
    114 /* 111 */   "UNDEF",
     114/* 111 */   "RETURN_BY_REF",
    115115/* 112 */   "INIT_METHOD_CALL",
    116116/* 113 */   "INIT_STATIC_METHOD_CALL",
     
    152152/* 149 */   "HANDLE_EXCEPTION",
    153153/* 150 */   "USER_OPCODE",
    154 /* 151 */   "U_NORMALIZE",
     154/* 151 */   "UNDEF",
    155155/* 152 */   "JMP_SET",
    156 /* 153 */   "DECLARE_LAMBDA_FUNCTION"
     156/* 153 */   "DECLARE_LAMBDA_FUNCTION",
     157/* 154 */   "ADD_TRAIT",
     158/* 155 */   "BIND_TRAITS",
     159/* 156 */   "SEPARATE"
    157160};
  • trunk/disassembler.c

    r709 r714  
    2323    int bufsize = 2;
    2424    char *buf;
    25     int keysize;
    2625
    2726    xc_compile_result_init_cur(&cr, op_array TSRMLS_CC);
     
    4645        xc_dasm_zend_function(zv, b->pData TSRMLS_CC);
    4746
    48         add_u_assoc_zval_ex(list, BUCKET_KEY_TYPE(b), b->arKey, b->nKeyLength, zv);
     47        add_u_assoc_zval_ex(list, BUCKET_KEY_TYPE(b), ZSTR(BUCKET_KEY_S(b)), b->nKeyLength, zv);
    4948    }
    5049    add_assoc_zval_ex(dst, ZEND_STRS("function_table"), list);
     
    5554    b = TG(internal_class_tail) ? TG(internal_class_tail)->pListNext : TG(class_table).pListHead;
    5655    for (; b; b = b->pListNext) {
     56        int keysize, keyLength;
     57
    5758        ALLOC_INIT_ZVAL(zv);
    5859        array_init(zv);
     
    6869        memcpy(buf, BUCKET_KEY_S(b), keysize);
    6970        buf[keysize - 2] = buf[keysize - 1] = ""[0];
    70         keysize = b->nKeyLength;
     71        keyLength = b->nKeyLength;
    7172#ifdef IS_UNICODE
    7273        if (BUCKET_KEY_TYPE(b) == IS_UNICODE) {
    7374            if (buf[0] == ""[0] && buf[1] == ""[0]) {
    74                 keysize ++;
     75                keyLength ++;
    7576            }
    7677        } else
     
    7879        {
    7980            if (buf[0] == ""[0]) {
    80                 keysize ++;
     81                keyLength ++;
    8182            }
    8283        }
    83         add_u_assoc_zval_ex(list, BUCKET_KEY_TYPE(b), ZSTR(buf), b->nKeyLength, zv);
     84        add_u_assoc_zval_ex(list, BUCKET_KEY_TYPE(b), ZSTR(buf), keyLength, zv);
    8485    }
    8586    efree(buf);
Note: See TracChangeset for help on using the changeset viewer.