Changeset 1385 for trunk


Ignore:
Timestamp:
2013-09-22T18:17:46+02:00 (20 months ago)
Author:
moo
Message:

readonly protection for copied array

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/processor.m4

    r1382 r1385  
    669669            case ZEND_FAST_CALL:
    670670#   endif
    671                 assert(Z_OP(SRC(`op1')).jmp_addr >= processor->active_op_array_src->opcodes && Z_OP(SRC(`op1')).jmp_addr - processor->active_op_array_src->opcodes < processor->active_op_array_src->last);
     671                assert(Z_OP(SRC(`op1')).jmp_addr >= processor->active_op_array_src->opcodes);
     672                assert(Z_OP(SRC(`op1')).jmp_addr - processor->active_op_array_src->opcodes < processor->active_op_array_src->last);
    672673                Z_OP(DST(`op1')).jmp_addr = processor->active_op_array_dst->opcodes + (Z_OP(SRC(`op1')).jmp_addr - processor->active_op_array_src->opcodes);
    673                 assert(Z_OP(DST(`op1')).jmp_addr >= processor->active_op_array_dst->opcodes && Z_OP(DST(`op1')).jmp_addr - processor->active_op_array_dst->opcodes < processor->active_op_array_dst->last);
     674                assert(Z_OP(DST(`op1')).jmp_addr >= processor->active_op_array_dst->opcodes);
     675                assert(Z_OP(DST(`op1')).jmp_addr - processor->active_op_array_dst->opcodes < processor->active_op_array_dst->last);
    674676                break;
    675677
     
    684686            case ZEND_JMP_SET_VAR:
    685687#   endif
    686                 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);
     688                assert(Z_OP(SRC(`op2')).jmp_addr >= processor->active_op_array_src->opcodes);
     689                assert(Z_OP(SRC(`op2')).jmp_addr - processor->active_op_array_src->opcodes < processor->active_op_array_src->last);
    687690                Z_OP(DST(`op2')).jmp_addr = processor->active_op_array_dst->opcodes + (Z_OP(SRC(`op2')).jmp_addr - processor->active_op_array_src->opcodes);
    688                 assert(Z_OP(DST(`op2')).jmp_addr >= processor->active_op_array_dst->opcodes && Z_OP(DST(`op2')).jmp_addr - processor->active_op_array_dst->opcodes < processor->active_op_array_dst->last);
     691                assert(Z_OP(DST(`op2')).jmp_addr >= processor->active_op_array_dst->opcodes);
     692                assert(Z_OP(DST(`op2')).jmp_addr - processor->active_op_array_dst->opcodes < processor->active_op_array_dst->last);
    689693                break;
    690694
  • trunk/processor/struct.m4

    r1380 r1385  
    234234        ')dnl IFDASM
    235235        DONE(`$4')
     236        FIXPOINTER(`$3', `$4')
    236237        popdef(`FUNC_NAME')
    237238        popdef(`LOOPCOUNTER')
  • trunk/util/xc_stack.c

    r990 r1385  
    2828void* xc_stack_pop(S stack)
    2929{
    30     assert(stack != NULL && stack->size > 0);
     30    assert(stack != NULL);
     31    assert(stack->size > 0);
    3132    return stack->data[--stack->cnt];
    3233}
     
    3435void* xc_stack_top(S stack)
    3536{
    36     assert(stack != NULL && stack->cnt > 0);
     37    assert(stack != NULL);
     38    assert(stack->cnt > 0);
    3739    return stack->data[stack->cnt-1];
    3840}
     
    4042void* xc_stack_get(S stack, int n)
    4143{
    42     assert(stack != NULL && stack->cnt > 0);
     44    assert(stack != NULL);
     45    assert(stack->cnt > 0);
    4346    return stack->data[n];
    4447}
  • trunk/xcache/xc_allocator_bestfit.c

    r1136 r1385  
    193193    TRACE("freeing: %p, size=%lu", p, cur->size);
    194194    xc_block_check(cur);
    195     assert((char*)allocator < (char*)cur && (char*)cur < (char*)allocator + allocator->size);
     195    assert((char*)allocator < (char*)cur);
     196    assert((char*)cur < (char*)allocator + allocator->size);
    196197
    197198    /* find free block right before the p */
  • trunk/xcache/xc_utils.c

    r1321 r1385  
    157157            case ZEND_FAST_CALL:
    158158#   endif
    159                 assert(Z_OP(opline->op1).jmp_addr >= op_array->opcodes && (zend_uint) (Z_OP(opline->op1).jmp_addr - op_array->opcodes) < op_array->last);
     159                assert(Z_OP(opline->op1).jmp_addr >= op_array->opcodes);
     160                assert((zend_uint) (Z_OP(opline->op1).jmp_addr - op_array->opcodes) < op_array->last);
    160161                Z_OP(opline->op1).opline_num = Z_OP(opline->op1).jmp_addr - op_array->opcodes;
    161162                break;
     
    170171            case ZEND_JMP_SET_VAR:
    171172#   endif
    172                 assert(Z_OP(opline->op2).jmp_addr >= op_array->opcodes && (zend_uint) (Z_OP(opline->op2).jmp_addr - op_array->opcodes) < op_array->last);
     173                assert(Z_OP(opline->op2).jmp_addr >= op_array->opcodes);
     174                assert((zend_uint) (Z_OP(opline->op2).jmp_addr - op_array->opcodes) < op_array->last);
    173175                Z_OP(opline->op2).opline_num = Z_OP(opline->op2).jmp_addr - op_array->opcodes;
    174176                break;
Note: See TracChangeset for help on using the changeset viewer.