[-]
[+]
|
Changed |
php-xcache.changes
|
|
[-]
[+]
|
Changed |
php-xcache.spec
^
|
|
[-]
[+]
|
Deleted |
xcache-3.0.1.tar.bz2/devel.ini
^
|
@@ -1,30 +0,0 @@
-date.timezone = Asia/Shanghai
-memory_limit = 256M
-error_reporting = E_ALL|E_STRICT|E_DEPRECATED
-display_errors = On
-
-[xcache]
-zend_extension_debug_ts=./modules/xcache.so
-zend_extension_debug=./modules/xcache.so
-zend_extension_ts=./modules/xcache.so
-zend_extension=./modules/xcache.so
-xcache.cacher = On
-xcache.test = 1
-xcache.stat = 1
-xcache.experimental = On
-xcache.size = 64M
-xcache.count = 1
-xcache.var_size = 2M
-xcache.var_count = 1
-xcache.var_slots = 1000
-; xcache.mmap_path = "/dev/zero"
-xcache.mmap_path = "/tmp/xcache"
-xcache.readonly_protection = Off
-xcache.optimizer = On
-xcache.coredump_directory = "/tmp/"
-;xcache.coveragedump_directory = "/tmp/pcov/"
-xcache.coverager = On
-
-xcache.admin.user = "test"
-xcache.admin.pass = "098f6bcd4621d373cade4e832627b4f6"
-include_path = .:/test
|
[-]
[+]
|
Deleted |
xcache-3.0.1.tar.bz2/devel.php
^
|
@@ -1,9 +0,0 @@
-<?php
-
-function a() {
-}
-
-echo 1;
-include_once "test.php";
-include "b.php";
-include_once "b.php";
|
[-]
[+]
|
Deleted |
xcache-3.0.1.tar.bz2/devel/prepare.cfg
^
|
@@ -1,11 +0,0 @@
-# copy this file as devel.prepare.inc before modifying
-PHP4_x_DIR=
-PHP5_0_DIR=
-PHP5_1_DIR=
-PHP5_4_DIR=/home/moo/src/php/php5
-PHP6_x_DIR=
-
-PHP_DEVEL_DIR=/home/moo/src/php/php5
-
-# path to eaccelerator source dir
-EA_DIR=
|
[-]
[+]
|
Deleted |
xcache-3.0.1.tar.bz2/devel/run.cfg
^
|
@@ -1,15 +0,0 @@
-# vim:syntax=sh
-ulimit -c0
-#args=mod_disassembler/sample.php
-#args=fcgi
-#args=/home/xuefer/src/php/php5/Zend/tests/bug55086.php
-#args=/home/xuefer/src/php/php5/Zend/tests/bug34065.php
-
-#type=xtest
-#type=gdb
-
-dirs="php5.2-debug
-php5-debug
-php5-debug-zts
-php5-obj"
-dirs="php5-debug-zts"
|
[-]
[+]
|
Changed |
xcache-3.0.3.tar.bz2/COPYING
^
|
@@ -1,6 +1,6 @@
-Copyright (c) 2005-2012, mOo, phpxcache@gmail.com, XCache
+Copyright (c) 2005-2013, mOo, phpxcache@gmail.com, XCache
All rights reserved.
Redistribution and use in source and binary forms, with or without
|
[-]
[+]
|
Changed |
xcache-3.0.3.tar.bz2/ChangeLog
^
|
@@ -1,3 +1,16 @@
+3.0.3 2013-16.18
+========
+ * clean files in release (fix htdocs config)
+
+3.0.2 2013-06-10
+ChangeLog
+========
+ * fixes #303: tablesort.js not found in Diagnosis and Coverager
+ * fixes #297: segv on startup under sparc, ini setting overflow
+ * fixes #296: (PHP5.4+ only bug), racecondition Multiple instances of the same software causes PHP "cannot redeclare class" errors when readonly_protection is not in use
+ * fixes #301: refix locking impl
+ * fixes #307: compatible with Zend Debugger which requires to be installed after Zend Extension Manager
+
3.0.1 2013-01-11
ChangeLog
========
|
[-]
[+]
|
Changed |
xcache-3.0.3.tar.bz2/NEWS
^
|
@@ -1,3 +1,13 @@
+3.0.3 2013-16.18
+========
+ * clean files in release (fix htdocs config)
+
+3.0.2 2013-06-10
+========
+ * (PHP5.4+ only bug) random "cannot redeclare class" errors is now gone. Can also be avoid by using readonly_protection (unavailable with /dev/zero).
+ * fixes SEGV with Zend Debugger
+ * more bug fixes
+
3.0.1 2013-01-11
========
* bug fixes
|
[-]
[+]
|
Changed |
xcache-3.0.3.tar.bz2/htdocs/common/tablesort.js
^
|
(renamed from htdocs/cacher/tablesort.js)
|
[-]
[+]
|
Changed |
xcache-3.0.3.tar.bz2/htdocs/common/tablesort.js
^
|
(renamed from htdocs/cacher/tablesort.js)
|
[-]
[+]
|
Changed |
xcache-3.0.3.tar.bz2/mod_cacher/xc_cache.h
^
|
@@ -193,6 +193,9 @@
zend_uint num_args;
zend_arg_info *arg_info;
#endif
+#ifdef ZEND_ENGINE_2_4
+ zend_literal *literals;
+#endif
zend_op *opcodes;
} xc_gc_op_array_t;
/* }}} */
|
[-]
[+]
|
Changed |
xcache-3.0.3.tar.bz2/mod_cacher/xc_cacher.c
^
|
@@ -2282,6 +2282,11 @@
if (op_array->opcodes) {
efree(op_array->opcodes);
}
+#ifdef ZEND_ENGINE_2_4
+ if (op_array->literals) {
+ efree(op_array->literals);
+ }
+#endif
}
/* }}} */
|
[-]
[+]
|
Changed |
xcache-3.0.3.tar.bz2/processor/processor.m4
^
|
@@ -716,6 +716,9 @@
if (shallow_copy) {
zend_bool gc_arg_info = 0;
zend_bool gc_opcodes = 0;
+#ifdef ZEND_ENGINE_2_4
+ zend_bool gc_literals = 0;
+#endif
/* really fast shallow copy */
memcpy(dst, src, sizeof(src[0]));
dst->refcount[0] = 1000;
@@ -732,14 +735,23 @@
#endif
dst->filename = processor->entry_php_src->filepath;
#ifdef ZEND_ENGINE_2_4
- if (src->literals /* || op_array_info->literalsinfo_cnt */) {
+ if (src->literals) {
gc_opcodes = 1;
+ if (op_array_info->literalinfo_cnt) {
+ gc_literals = 1;
+ }
}
#else
if (op_array_info->oplineinfo_cnt) {
gc_opcodes = 1;
}
#endif
+#ifdef ZEND_ENGINE_2_4
+ if (gc_literals) {
+ dnl used when copying opcodes
+ COPY_N_EX(last_literal, zend_literal, literals)
+ }
+#endif
if (gc_opcodes) {
zend_op *opline, *end;
COPY_N_EX(last, zend_op, opcodes)
@@ -786,13 +798,20 @@
}
}
}
- if (gc_arg_info || gc_opcodes) {
+ if (gc_arg_info || gc_opcodes
+#ifdef ZEND_ENGINE_2_4
+ || gc_literals
+#endif
+ ) {
xc_gc_op_array_t gc_op_array;
#ifdef ZEND_ENGINE_2
gc_op_array.num_args = gc_arg_info ? dst->num_args : 0;
gc_op_array.arg_info = gc_arg_info ? dst->arg_info : NULL;
#endif
gc_op_array.opcodes = gc_opcodes ? dst->opcodes : NULL;
+#ifdef ZEND_ENGINE_2_4
+ gc_op_array.literals = gc_literals ? dst->literals : NULL;
+#endif
xc_gc_add_op_array(&gc_op_array TSRMLS_CC);
}
IFAUTOCHECK(`xc_autocheck_skip = 1;')
|
[-]
[+]
|
Changed |
xcache-3.0.3.tar.bz2/xcache.c
^
|
@@ -36,7 +36,9 @@
/* {{{ globals */
static char *xc_coredump_dir = NULL;
-static zend_bool xc_coredump_type = 0;
+#ifdef ZEND_WIN32
+static zend_ulong xc_coredump_type = 0;
+#endif
static zend_bool xc_disable_on_crash = 0;
static zend_compile_file_t *old_compile_file = NULL;
@@ -54,6 +56,21 @@
}
/* }}} */
+/* devel helper function */
+#if 0
+static void xc_list_extensions() /* {{{ */
+{
+ zend_llist_element *element;
+ zend_extension *ext;
+ fprintf(stderr, "extensions:\n");
+ for (element = zend_extensions.head; element; element = element->next) {
+ ext = (zend_extension *) element->data;
+ fprintf(stderr, " - %s\n", ext->name);
+ }
+}
+/* }}} */
+#endif
+
/* module helper function */
static int xc_init_constant(int module_number TSRMLS_DC) /* {{{ */
{
@@ -564,10 +581,10 @@
startup_func_t old_startup;
} xc_incompatible_zend_extension_info_t;
static xc_incompatible_zend_extension_info_t xc_incompatible_zend_extensions[] = {
+ { "Zend Extension Manager", NULL },
{ "Zend Optimizer", NULL },
{ "the ionCube PHP Loader", NULL }
};
-zend_llist_element **xc_zend_extension_elements;
static xc_incompatible_zend_extension_info_t *xc_get_incompatible_zend_extension_info(const char *name)
{
@@ -600,23 +617,25 @@
xc_incompatible_zend_extension_info_t *incompatible_zend_extension_info = xc_get_incompatible_zend_extension_info(extension->name);
int status;
zend_bool catched = 0;
- zend_llist old_zend_extensions;
+ zend_llist saved_zend_extensions_container; /* without elements */
+ zend_llist_element **saved_zend_extensions_elments;
+ size_t new_zend_extensions_elments_count;
+ zend_llist_element **new_zend_extensions_elments;
zend_extension *ext;
size_t i;
zend_llist_element *element;
TSRMLS_FETCH();
- /* restore */
+ /* restore startup hack */
extension->startup = incompatible_zend_extension_info->old_startup;
incompatible_zend_extension_info->old_startup = NULL;
assert(extension->startup);
- /* save */
- assert(!xc_zend_extension_elements);
- old_zend_extensions = zend_extensions;
- xc_zend_extension_elements = malloc(sizeof(zend_llist_element *) * old_zend_extensions.count);
- for (i = 0, element = old_zend_extensions.head; element; ++i, element = element->next) {
- xc_zend_extension_elements[i] = element;
+ /* save extensions list */
+ saved_zend_extensions_container = zend_extensions;
+ saved_zend_extensions_elments = malloc(sizeof(zend_llist_element *) * saved_zend_extensions_container.count);
+ for (i = 0, element = saved_zend_extensions_container.head; element; ++i, element = element->next) {
+ saved_zend_extensions_elments[i] = element;
}
/* hide all XCache extensions from it */
@@ -624,8 +643,8 @@
zend_extensions.tail = NULL;
zend_extensions.count = 0;
- for (i = 0; i < old_zend_extensions.count; ++i) {
- element = xc_zend_extension_elements[i];
+ for (i = 0; i < saved_zend_extensions_container.count; ++i) {
+ element = saved_zend_extensions_elments[i];
element->next = element->prev = NULL;
ext = (zend_extension *) element->data;
@@ -643,21 +662,46 @@
catched = 1;
} zend_end_try();
- /* restore */
- zend_extensions = old_zend_extensions;
+ /* save newly added extensions added by this extension*/
+ new_zend_extensions_elments_count = zend_extensions.count - 1;
+ new_zend_extensions_elments = NULL;
+ if (new_zend_extensions_elments_count) {
+ new_zend_extensions_elments = malloc(sizeof(zend_llist_element *) * new_zend_extensions_elments_count);
+ element = zend_extensions.head;
+ for (i = 0, element = element->next; element; ++i, element = element->next) {
+ new_zend_extensions_elments[i] = element;
+ }
+ }
+
+ /* restore original extension list*/
+ zend_extensions = saved_zend_extensions_container;
zend_extensions.head = NULL;
zend_extensions.tail = NULL;
zend_extensions.count = 0;
- for (i = 0; i < old_zend_extensions.count; ++i) {
- element = xc_zend_extension_elements[i];
+ for (i = 0; i < saved_zend_extensions_container.count; ++i) {
+ element = saved_zend_extensions_elments[i];
element->next = element->prev = NULL;
xc_zend_llist_add_element(&zend_extensions, element);
++zend_extensions.count;
- }
- free(xc_zend_extension_elements);
- xc_zend_extension_elements = NULL;
+ ext = (zend_extension *) element->data;
+ if (ext == extension && new_zend_extensions_elments_count) {
+ /* add new created extension */
+ size_t j;
+ for (j = 0; j < new_zend_extensions_elments_count; ++j) {
+ element = new_zend_extensions_elments[j];
+ element->next = element->prev = NULL;
+
+ xc_zend_llist_add_element(&zend_extensions, element);
+ ++zend_extensions.count;
+ }
+ }
+ }
+ free(saved_zend_extensions_elments);
+ if (new_zend_extensions_elments) {
+ free(new_zend_extensions_elments);
+ }
if (catched) {
zend_bailout();
@@ -720,7 +764,9 @@
/* {{{ PHP_INI */
PHP_INI_BEGIN()
PHP_INI_ENTRY1 ("xcache.coredump_directory", "", PHP_INI_SYSTEM, xcache_OnUpdateString, &xc_coredump_dir)
+#ifdef ZEND_WIN32
PHP_INI_ENTRY1 ("xcache.coredump_type", "0", PHP_INI_SYSTEM, xcache_OnUpdateULong, &xc_coredump_type)
+#endif
PHP_INI_ENTRY1_EX ("xcache.disable_on_crash", "0", PHP_INI_SYSTEM, xcache_OnUpdateBool, &xc_disable_on_crash, zend_ini_boolean_displayer_cb)
PHP_INI_ENTRY1_EX ("xcache.test", "0", PHP_INI_SYSTEM, xcache_OnUpdateBool, &xc_test, zend_ini_boolean_displayer_cb)
STD_PHP_INI_BOOLEAN("xcache.experimental", "0", PHP_INI_ALL, OnUpdateBool, experimental, zend_xcache_globals, xcache_globals)
|
[-]
[+]
|
Changed |
xcache-3.0.3.tar.bz2/xcache.h
^
|
@@ -2,7 +2,7 @@
#define __XCACHE_H
#define XCACHE_NAME "XCache"
#ifndef XCACHE_VERSION
-# define XCACHE_VERSION "3.0.1"
+# define XCACHE_VERSION "3.0.3"
#endif
#define XCACHE_AUTHOR "mOo"
#define XCACHE_COPYRIGHT "Copyright (c) 2005-2013"
|
[-]
[+]
|
Changed |
xcache-3.0.3.tar.bz2/xcache/xc_const_string.c
^
|
@@ -65,7 +65,7 @@
# include "xc_const_string_opcodes_php6.x.h"
#elif defined(ZEND_ENGINE_2_4)
# include "xc_const_string_opcodes_php5.4.h"
-#elif defined(ZEND_ENGINE_2_3)
+#elif defined(ZEND_ENGINE_2_2)
# include "xc_const_string_opcodes_php5.3.h"
#elif defined(ZEND_ENGINE_2_1)
# include "xc_const_string_opcodes_php5.1.h"
|
[-]
[+]
|
Changed |
xcache-3.0.3.tar.bz2/xcache/xc_lock.c
^
|
@@ -28,7 +28,7 @@
/* {{{ detect which lock is needed */
#if defined(XC_LOCK_NEED_TS) && defined(XC_LOCK_NEED_INTERPROCESS)
-# ifdef PTHREAD
+# ifdef PTHREADS
# define XC_LOCK_USE_PTHREAD
# ifndef _POSIX_THREAD_PROCESS_SHARED
# define XC_LOCK_USE_FCNTL
@@ -278,7 +278,6 @@
#ifdef XC_LOCK_USE_TSRM
tsrm_mutex_free(lck->tsrm_mutex);
- lck->tsrm_mutex = NULL;
#endif
#ifdef XC_LOCK_USE_FCNTL
|