1
0
Fork 0

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 10 years ago
parent db77416e0b
commit dd6e9fbe85

@ -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,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

@ -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