Browse Source

merge r1381,r1388,r1394 from trunk: fixed #324: xcache.readonly_protection = Off cause SEGV under mass concurrent

git-svn-id: svn://svn.lighttpd.net/xcache/branches/3.0@1395 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 8 years ago
parent
commit
2827460c72
  1. 1
      ChangeLog
  2. 1
      NEWS
  3. 10
      processor/processor.m4
  4. 1
      xcache_globals.h

1
ChangeLog

@ -2,6 +2,7 @@
ChangeLog
========
* cacher
* fixed #324: xcache.readonly_protection = Off cause SEGV under mass concurrent
* fixed #323: refix locking impl for threaded env
3.0.3 2013-06-18

1
NEWS

@ -1,5 +1,6 @@
3.0.4 2013-09-??
========
* improve stability under massive concurrent
* refix locking impl for threaded env
3.0.3 2013-06-18

10
processor/processor.m4

@ -721,7 +721,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);
XG(op_array_dummy_refcount_holder) = ((zend_uint) -1) / 2;
#ifdef ZEND_ACC_ALIAS
if ((processor->active_class_entry_src && (processor->active_class_entry_src->ce_flags & ZEND_ACC_TRAIT))) {
PROC_ZSTRING(, function_name)
@ -861,8 +862,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
xcache_globals.h

@ -40,6 +40,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