Changeset 785


Ignore:
Timestamp:
2011-04-25T08:53:01+02:00 (4 years ago)
Author:
moo
Message:

fix false assertion for empty while (1) {}

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/processor.m4

    r779 r785  
    612612#endif
    613613            case ZEND_JMP:
    614                 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);
     614                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);
    615615                Z_OP(dst->op1).jmp_addr = processor->active_opcodes_dst + (Z_OP(src->op1).jmp_addr - processor->active_opcodes_src);
    616                 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);
     616                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);
    617617                break;
    618618
     
    624624            case ZEND_JMP_SET:
    625625#endif
    626                 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);
     626                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);
    627627                Z_OP(dst->op2).jmp_addr = processor->active_opcodes_dst + (Z_OP(src->op2).jmp_addr - processor->active_opcodes_src);
    628                 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);
     628                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);
    629629                break;
    630630
  • trunk/utils.c

    r778 r785  
    150150#endif
    151151            case ZEND_JMP:
    152                 assert(Z_OP(opline->op1).jmp_addr - op_array->opcodes < op_array->last);
     152                assert(Z_OP(opline->op1).jmp_addr >= op_array->opcodes && Z_OP(opline->op1).jmp_addr - op_array->opcodes < op_array->last);
    153153                Z_OP(opline->op1).opline_num = Z_OP(opline->op1).jmp_addr - op_array->opcodes;
    154154                break;
     
    160160            case ZEND_JMP_SET:
    161161#endif
    162                 assert(Z_OP(opline->op2).jmp_addr - op_array->opcodes < op_array->last);
     162                assert(Z_OP(opline->op2).jmp_addr >= op_array->opcodes && Z_OP(opline->op2).jmp_addr - op_array->opcodes < op_array->last);
    163163                Z_OP(opline->op2).opline_num = Z_OP(opline->op2).jmp_addr - op_array->opcodes;
    164164                break;
Note: See TracChangeset for help on using the changeset viewer.