Browse Source

PHP_5_4: fix for ZEND_JMP_SET_VAR

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@875 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 10 years ago
parent
commit
20ea91ac58
  1. 6
      processor/processor.m4
  2. 3
      utils.c

6
processor/processor.m4

@ -665,6 +665,9 @@ DEF_STRUCT_P_FUNC(`zend_op', , `dnl {{{
case ZEND_JMPNZ_EX:
#ifdef ZEND_JMP_SET
case ZEND_JMP_SET:
#endif
#ifdef ZEND_JMP_SET_VAR
case ZEND_JMP_SET_VAR:
#endif
assert(Z_OP(src->op2).jmp_addr >= processor->active_op_array_src->opcodes && Z_OP(src->op2).jmp_addr - processor->active_op_array_src->opcodes < processor->active_op_array_src->last);
Z_OP(dst->op2).jmp_addr = processor->active_op_array_dst->opcodes + (Z_OP(src->op2).jmp_addr - processor->active_op_array_src->opcodes);
@ -757,6 +760,9 @@ DEF_STRUCT_P_FUNC(`zend_op_array', , `dnl {{{
case ZEND_JMPNZ_EX:
#ifdef ZEND_JMP_SET
case ZEND_JMP_SET:
#endif
#ifdef ZEND_JMP_SET_VAR
case ZEND_JMP_SET_VAR:
#endif
Z_OP(opline->op2).jmp_addr = dst->opcodes + (Z_OP(opline->op2).jmp_addr - src->opcodes);
break;

3
utils.c

@ -174,6 +174,9 @@ int xc_undo_pass_two(zend_op_array *op_array TSRMLS_DC) /* {{{ */
case ZEND_JMPNZ_EX:
#ifdef ZEND_JMP_SET
case ZEND_JMP_SET:
#endif
#ifdef ZEND_JMP_SET_VAR
case ZEND_JMP_SET_VAR:
#endif
assert(Z_OP(opline->op2).jmp_addr >= op_array->opcodes && 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;

Loading…
Cancel
Save