Browse Source

shallow copy for some compiler result infos

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@495 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 14 years ago
parent
commit
1d225c1885
  1. 14
      processor/processor.m4
  2. 7
      xcache.c

14
processor/processor.m4

@ -763,7 +763,11 @@ DEF_STRUCT_P_FUNC(`xc_entry_data_php_t', , `dnl {{{
#ifdef HAVE_XCACHE_CONSTANT
DISPATCH(zend_uint, constinfo_cnt)
STRUCT_ARRAY(constinfo_cnt, xc_constinfo_t, constinfos)
IFRESTORE(`
COPY(constinfos)
', `
STRUCT_ARRAY(constinfo_cnt, xc_constinfo_t, constinfos)
')
#endif
DISPATCH(zend_uint, funcinfo_cnt)
@ -776,12 +780,16 @@ DEF_STRUCT_P_FUNC(`xc_entry_data_php_t', , `dnl {{{
')
')
STRUCT_ARRAY(classinfo_cnt, xc_classinfo_t, classinfos)
popdef(`BEFORE_LOOP')
#ifdef ZEND_ENGINE_2_1
DISPATCH(zend_uint, autoglobal_cnt)
STRUCT_ARRAY(autoglobal_cnt, xc_autoglobal_t, autoglobals)
IFRESTORE(`
COPY(autoglobals)
', `
STRUCT_ARRAY(autoglobal_cnt, xc_autoglobal_t, autoglobals)
')
#endif
DISPATCH(zend_bool, have_early_binding)
popdef(`BEFORE_LOOP')
DISPATCH(zend_bool, have_references)
')
dnl }}}

7
xcache.c

@ -1165,7 +1165,12 @@ static zend_op_array *xc_compile_restore(xc_entry_t *stored_xce, zend_file_handl
catched = 1;
} zend_end_try();
xc_free_php(&php TSRMLS_CC);
if (php.funcinfos) {
efree(php.funcinfos);
}
if (php.classinfos) {
efree(php.classinfos);
}
if (catched) {
zend_bailout();

Loading…
Cancel
Save