Browse Source

fix false assertion for empty while (1) {}

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@785 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 11 years ago
parent
commit
0e72928f44
  1. 8
      processor/processor.m4
  2. 4
      utils.c

8
processor/processor.m4

@ -611,9 +611,9 @@ DEF_STRUCT_P_FUNC(`zend_op', , `dnl {{{
case ZEND_GOTO:
#endif
case ZEND_JMP:
assert(Z_OP(src->op1).jmp_addr > processor->active_opcodes_src && Z_OP(src->op1).jmp_addr - processor->active_opcodes_src < processor->active_op_array_src->last);
assert(Z_OP(src->op1).jmp_addr >= processor->active_opcodes_src && Z_OP(src->op1).jmp_addr - processor->active_opcodes_src < processor->active_op_array_src->last);
Z_OP(dst->op1).jmp_addr = processor->active_opcodes_dst + (Z_OP(src->op1).jmp_addr - processor->active_opcodes_src);
assert(Z_OP(dst->op1).jmp_addr > processor->active_opcodes_dst && Z_OP(dst->op1).jmp_addr - processor->active_opcodes_dst < processor->active_op_array_dst->last);
assert(Z_OP(dst->op1).jmp_addr >= processor->active_opcodes_dst && Z_OP(dst->op1).jmp_addr - processor->active_opcodes_dst < processor->active_op_array_dst->last);
break;
case ZEND_JMPZ:
@ -623,9 +623,9 @@ DEF_STRUCT_P_FUNC(`zend_op', , `dnl {{{
#ifdef ZEND_JMP_SET
case ZEND_JMP_SET:
#endif
assert(Z_OP(src->op2).jmp_addr > processor->active_opcodes_src && Z_OP(src->op2).jmp_addr - processor->active_opcodes_src < processor->active_op_array_src->last);
assert(Z_OP(src->op2).jmp_addr >= processor->active_opcodes_src && Z_OP(src->op2).jmp_addr - processor->active_opcodes_src < processor->active_op_array_src->last);
Z_OP(dst->op2).jmp_addr = processor->active_opcodes_dst + (Z_OP(src->op2).jmp_addr - processor->active_opcodes_src);
assert(Z_OP(dst->op2).jmp_addr > processor->active_opcodes_dst && Z_OP(dst->op2).jmp_addr - processor->active_opcodes_dst < processor->active_op_array_dst->last);
assert(Z_OP(dst->op2).jmp_addr >= processor->active_opcodes_dst && Z_OP(dst->op2).jmp_addr - processor->active_opcodes_dst < processor->active_op_array_dst->last);
break;
default:

4
utils.c

@ -149,7 +149,7 @@ 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);
assert(Z_OP(opline->op1).jmp_addr >= op_array->opcodes && 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;
break;
case ZEND_JMPZ:
@ -159,7 +159,7 @@ 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);
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;
break;
}

Loading…
Cancel
Save