diff --git a/utils.c b/utils.c index 55d787f..d9260dc 100644 --- a/utils.c +++ b/utils.c @@ -149,8 +149,8 @@ int xc_undo_pass_two(zend_op_array *op_array TSRMLS_DC) /* {{{ */ case ZEND_GOTO: #endif case ZEND_JMP: + assert(Z_OP(opline->op1).jmp_addr - op_array->opcodes < op_array->last); Z_OP(opline->op1).opline_num = Z_OP(opline->op1).jmp_addr - op_array->opcodes; - assert(Z_OP(opline->op1).opline_num < op_array->last); break; case ZEND_JMPZ: case ZEND_JMPNZ: @@ -159,8 +159,8 @@ int xc_undo_pass_two(zend_op_array *op_array TSRMLS_DC) /* {{{ */ #ifdef ZEND_JMP_SET case ZEND_JMP_SET: #endif + assert(Z_OP(opline->op2).jmp_addr - op_array->opcodes < op_array->last); Z_OP(opline->op2).opline_num = Z_OP(opline->op2).jmp_addr - op_array->opcodes; - assert(Z_OP(opline->op2).opline_num < op_array->last); break; } #endif @@ -233,7 +233,7 @@ int xc_redo_pass_two(zend_op_array *op_array TSRMLS_DC) /* {{{ */ /* }}} */ #ifdef HAVE_XCACHE_OPCODE_SPEC_DEF -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) /* {{{ */ +static 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) /* {{{ */ { #ifdef ZEND_ENGINE_2 if ((*op_type != IS_UNUSED && (spec == OPSPEC_UCLASS || spec == OPSPEC_CLASS)) || diff --git a/xcache.h b/xcache.h index deff34e..167db4f 100644 --- a/xcache.h +++ b/xcache.h @@ -96,12 +96,14 @@ static inline void my_add_assoc_null_ex(zval *arg, char *key, uint key_len) # define Z_OP(op) (op) # define Z_OP_CONSTANT(op) (op).literal->constant # define Z_OP_TYPE(op) op##_##type +# define Z_OP_TYPEOF_TYPE zend_uchar # define Z_CLASS_INFO(className) (className).info.user #else # define Z_OP(op) (op).u # define Z_OP_CONSTANT(op) (op).u.constant # define Z_OP_TYPE(op) (op).op_type +# define Z_OP_TYPEOF_TYPE int typedef znode znode_op; # define Z_CLASS_INFO(className) (className)