Browse Source

possible fix for #324

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

+ 7
- 3
processor/processor.m4 View File

@ -734,7 +734,8 @@ DEF_STRUCT_P_FUNC(`zend_op_array', , `dnl {{{
#endif
/* really fast shallow copy */
memcpy(dst, src, sizeof(src[0]));
DST(`refcount[0]') = 1000;
DST(`refcount') = &XG(op_array_dummy_refcount_holder);
DST(`refcount[0]') = -1;
#ifdef ZEND_ACC_ALIAS
if ((processor->active_class_entry_src && (processor->active_class_entry_src->ce_flags & ZEND_ACC_TRAIT))) {
PROC_ZSTRING(, function_name)
@ -877,8 +878,11 @@ DEF_STRUCT_P_FUNC(`zend_op_array', , `dnl {{{
#endif
STRUCT_P(zend_uint, refcount)
UNFIXPOINTER(zend_uint, refcount)
IFSTORE(`DST(`refcount[0]') = 1;')
IFSTORE(`
UNFIXPOINTER(zend_uint, refcount)
DST(`refcount[0]') = 1;
FIXPOINTER(zend_uint, refcount)
')
#ifdef ZEND_ENGINE_2_4
dnl used when copying opcodes


+ 1
- 0
xcache_globals.h View File

@ -43,6 +43,7 @@ ZEND_BEGIN_MODULE_GLOBALS(xcache)
zend_bool internal_table_copied;
void *sandbox;
zend_uint op_array_dummy_refcount_holder;
ZEND_END_MODULE_GLOBALS(xcache)
ZEND_EXTERN_MODULE_GLOBALS(xcache)


Loading…
Cancel
Save