Changeset 769 in svn for trunk


Ignore:
Timestamp:
2011-04-18T09:45:56+02:00 (4 years ago)
Author:
Xuefer
Message:

fix type of op_type mismsatch for PHP 5-, assert before changing opline_num

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/utils.c

    r749 r769  
    150150#endif
    151151            case ZEND_JMP:
     152                assert(Z_OP(opline->op1).jmp_addr - op_array->opcodes < op_array->last);
    152153                Z_OP(opline->op1).opline_num = Z_OP(opline->op1).jmp_addr - op_array->opcodes;
    153                 assert(Z_OP(opline->op1).opline_num < op_array->last);
    154154                break;
    155155            case ZEND_JMPZ:
     
    160160            case ZEND_JMP_SET:
    161161#endif
     162                assert(Z_OP(opline->op2).jmp_addr - op_array->opcodes < op_array->last);
    162163                Z_OP(opline->op2).opline_num = Z_OP(opline->op2).jmp_addr - op_array->opcodes;
    163                 assert(Z_OP(opline->op2).opline_num < op_array->last);
    164164                break;
    165165        }
     
    234234
    235235#ifdef HAVE_XCACHE_OPCODE_SPEC_DEF
    236 static void xc_fix_opcode_ex_znode(int tofix, xc_op_spec_t spec, zend_uchar *op_type, znode_op *op, int type TSRMLS_DC) /* {{{ */
     236static void xc_fix_opcode_ex_znode(int tofix, xc_op_spec_t spec, Z_OP_TYPEOF_TYPE *op_type, znode_op *op, int type TSRMLS_DC) /* {{{ */
    237237{
    238238#ifdef ZEND_ENGINE_2
  • trunk/xcache.h

    r729 r769  
    9797#   define Z_OP_CONSTANT(op) (op).literal->constant
    9898#   define Z_OP_TYPE(op) op##_##type
     99#   define Z_OP_TYPEOF_TYPE zend_uchar
    99100
    100101#   define Z_CLASS_INFO(className) (className).info.user
     
    103104#   define Z_OP_CONSTANT(op) (op).u.constant
    104105#   define Z_OP_TYPE(op) (op).op_type
     106#   define Z_OP_TYPEOF_TYPE int
    105107typedef znode znode_op;
    106108
Note: See TracChangeset for help on using the changeset viewer.