Browse Source

readonly protection for copied array, with jmp_addr fixed

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1387 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.1
Xuefer 7 years ago
parent
commit
bd30aa1975
2 changed files with 3 additions and 0 deletions
  1. +2
    -0
      processor/processor.m4
  2. +1
    -0
      processor/struct.m4

+ 2
- 0
processor/processor.m4 View File

@ -673,6 +673,7 @@ DEF_STRUCT_P_FUNC(`zend_op', , `dnl {{{
Z_OP(DST(`op1')).jmp_addr = processor->active_op_array_dst->opcodes + (Z_OP(SRC(`op1')).jmp_addr - processor->active_op_array_src->opcodes);
assert(Z_OP(DST(`op1')).jmp_addr >= processor->active_op_array_dst->opcodes);
assert(Z_OP(DST(`op1')).jmp_addr - processor->active_op_array_dst->opcodes < processor->active_op_array_dst->last);
FIXPOINTER_EX(zend_op *, `Z_OP(DST(`op1')).jmp_addr')
break;
case ZEND_JMPZ:
@ -690,6 +691,7 @@ DEF_STRUCT_P_FUNC(`zend_op', , `dnl {{{
Z_OP(DST(`op2')).jmp_addr = processor->active_op_array_dst->opcodes + (Z_OP(SRC(`op2')).jmp_addr - processor->active_op_array_src->opcodes);
assert(Z_OP(DST(`op2')).jmp_addr >= processor->active_op_array_dst->opcodes);
assert(Z_OP(DST(`op2')).jmp_addr - processor->active_op_array_dst->opcodes < processor->active_op_array_dst->last);
FIXPOINTER_EX(zend_op *, `Z_OP(DST(`op2')).jmp_addr')
break;
default:


+ 1
- 0
processor/struct.m4 View File

@ -232,6 +232,7 @@ define(`STRUCT_ARRAY', `
dnl the end marker
ifelse(`$2', `', `IFCOPY(`DST(`$4[LOOPCOUNTER]') = NULL;')')
')dnl IFDASM
FIXPOINTER(`$3', `$4')
DONE(`$4')
popdef(`FUNC_NAME')
popdef(`LOOPCOUNTER')


Loading…
Cancel
Save