Changeset 314 for trunk/xcache.c
- Timestamp:
- 2006-12-10T03:31:42+01:00 (7 years ago)
- File:
-
- 1 edited
-
trunk/xcache.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache.c
r311 r314 942 942 old_classinfo_cnt = zend_hash_num_elements(CG(class_table)); 943 943 old_funcinfo_cnt = zend_hash_num_elements(CG(function_table)); 944 old_constinfo_cnt = zend_hash_num_elements(EG(zend_constants));944 old_constinfo_cnt = zend_hash_num_elements(EG(zend_constants)); 945 945 946 946 zend_try { … … 1140 1140 zend_bool gaveup = 0; 1141 1141 zend_bool catched = 0; 1142 zend_bool cached_php;1142 zend_bool newlycompiled; 1143 1143 char *filename; 1144 1144 char opened_path_buffer[MAXPATHLEN]; … … 1229 1229 /* {{{ compile */ 1230 1230 if (stored_php) { 1231 cached_php = 1;1231 newlycompiled = 0; 1232 1232 xce.data.php = stored_php; 1233 1233 } 1234 1234 else { 1235 cached_php = 0;1235 newlycompiled = 1; 1236 1236 1237 1237 /* make compile inside sandbox */ 1238 1238 xc_sandbox_init(&sandbox, filename TSRMLS_CC); 1239 1240 #ifdef HAVE_XCACHE_CONSTANT 1241 php.constinfos = NULL; 1242 #endif 1243 php.funcinfos = NULL; 1244 php.classinfos = NULL; 1245 #ifdef ZEND_ENGINE_2_1 1246 php.autoglobals = NULL; 1247 #endif 1239 1248 zend_try { 1240 1249 op_array = xc_compile_php(&php, h, type TSRMLS_CC); … … 1242 1251 catched = 1; 1243 1252 } zend_end_try(); 1244 xc_sandbox_free(&sandbox, 0 TSRMLS_CC); 1245 1253 1254 xce.data.php = &php; 1246 1255 if (catched) { 1247 cache->compiling = 0; 1248 zend_bailout(); 1249 } 1250 1251 xce.data.php = &php; 1256 goto err_aftersandbox; 1257 } 1252 1258 } 1253 1259 /* }}} */ … … 1273 1279 ENTER_LOCK_EX(cache) { /* {{{ php_store/entry_store */ 1274 1280 /* php_store */ 1275 if ( !cached_php) {1281 if (newlycompiled) { 1276 1282 stored_php = xc_php_store_dmz(&php TSRMLS_CC); 1277 1283 /* error */ … … 1297 1303 cache->compiling = 0; 1298 1304 if (catched) { 1299 zend_bailout(); 1300 } 1305 goto err_aftersandbox; 1306 } 1307 1308 xc_free_php(&php TSRMLS_CC); 1309 xc_sandbox_free(&sandbox, 0 TSRMLS_CC); 1301 1310 1302 1311 if (stored_xce) { … … 1311 1320 } 1312 1321 return xc_compile_restore(stored_xce, h TSRMLS_CC); 1322 } 1323 return op_array; 1324 1325 err_aftersandbox: 1326 xc_free_php(&php TSRMLS_CC); 1327 xc_sandbox_free(&sandbox, 0 TSRMLS_CC); 1328 1329 if (catched) { 1330 cache->compiling = 0; 1331 zend_bailout(); 1313 1332 } 1314 1333 return op_array;
Note: See TracChangeset
for help on using the changeset viewer.

