Browse Source

disassembler: fixes crash with nested sandbox (since 3.0)

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1275 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.1
Xuefer 8 years ago
parent
commit
dd6e9fbe85
  1. 1
      ChangeLog
  2. 1
      NEWS
  3. 6
      xcache/xc_sandbox.c

1
ChangeLog

@ -1,6 +1,7 @@
3.1.0 2013-??-??
ChangeLog
========
* disassembler: fixes crash with nested sandbox
* adds support for PHP_5_5
* compatible with fcntl fork

1
NEWS

@ -1,5 +1,6 @@
3.1.0 2013-??-??
========
* disassembler now working again (fail since 3.0)
* adds support for PHP_5_5
* compatible with fcntl fork

6
xcache/xc_sandbox.c

@ -44,7 +44,7 @@ static void xc_free_zend_constant(zend_constant *c) /* {{{ */
/* }}} */
#endif
typedef struct { /* sandbox {{{ */
typedef struct _xc_sandbox_t { /* sandbox {{{ */
ZEND_24(NOTHING, const) char *filename;
HashTable orig_included_files;
@ -76,6 +76,7 @@ typedef struct { /* sandbox {{{ */
#ifdef ZEND_COMPILE_IGNORE_INTERNAL_CLASSES
zend_uint orig_compiler_options;
#endif
struct _xc_sandbox_t *parent;
} xc_sandbox_t;
#undef TG
@ -228,6 +229,7 @@ static xc_sandbox_t *xc_sandbox_init(xc_sandbox_t *sandbox, ZEND_24(NOTHING, con
CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES | ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION | ZEND_COMPILE_DELAYED_BINDING;
#endif
sandbox->parent = XG(sandbox);
XG(sandbox) = (void *) sandbox;
XG(initial_compile_file_called) = 0;
return sandbox;
@ -319,7 +321,7 @@ static void xc_sandbox_install(xc_sandbox_t *sandbox TSRMLS_DC) /* {{{ */
/* }}} */
static void xc_sandbox_free(xc_sandbox_t *sandbox, zend_op_array *op_array TSRMLS_DC) /* {{{ */
{
XG(sandbox) = NULL;
XG(sandbox) = sandbox->parent;
#ifdef XCACHE_ERROR_CACHING
EG(user_error_handler_error_reporting) = sandbox->orig_user_error_handler_error_reporting;
#endif

Loading…
Cancel
Save