Changeset 405 for trunk/xcache.c
- Timestamp:
- 05/31/2007 03:48:08 AM (18 months ago)
- Files:
-
- 1 modified
-
trunk/xcache.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache.c
r403 r405 87 87 88 88 static zend_bool xc_initized = 0; 89 static zend_compile_file_t *origin_compile_file = NULL; 89 90 static zend_compile_file_t *old_compile_file = NULL; 90 91 static zend_llist_element *xc_llist_zend_extension = NULL; … … 974 975 old_constinfo_cnt = zend_hash_num_elements(EG(zend_constants)); 975 976 977 php->op_array = NULL; 978 XG(initial_compile_file_called) = 0; 976 979 zend_try { 977 980 op_array = old_compile_file(h, type TSRMLS_CC); … … 986 989 if (op_array == NULL) { 987 990 goto err_op_array; 991 } 992 993 if (!XG(initial_compile_file_called)) { 994 return op_array; 988 995 } 989 996 … … 1164 1171 } 1165 1172 /* }}} */ 1173 static zend_op_array *xc_check_initial_compile_file(zend_file_handle *h, int type TSRMLS_DC) /* {{{ */ 1174 { 1175 XG(initial_compile_file_called) = 1; 1176 return origin_compile_file(h, type TSRMLS_CC); 1177 } 1178 /* }}} */ 1166 1179 static zend_op_array *xc_compile_file(zend_file_handle *h, int type TSRMLS_DC) /* {{{ */ 1167 1180 { … … 1290 1303 } 1291 1304 1305 /* not cachable */ 1306 if (!php.op_array) { 1307 cache->compiling = 0; 1308 xc_sandbox_free(&sandbox, XC_InstallNoBinding TSRMLS_CC); 1309 return op_array; 1310 } 1311 1292 1312 xce.data.php = &php; 1293 1313 } … … 1355 1375 } 1356 1376 if (newlycompiled) { 1357 xc_sandbox_free(&sandbox, 0TSRMLS_CC);1377 xc_sandbox_free(&sandbox, XC_NoInstall TSRMLS_CC); 1358 1378 } 1359 1379 return xc_compile_restore(stored_xce, h TSRMLS_CC); … … 1363 1383 /* install it */ 1364 1384 CG(active_op_array) = op_array; 1365 xc_sandbox_free(&sandbox, 1TSRMLS_CC);1385 xc_sandbox_free(&sandbox, XC_Install TSRMLS_CC); 1366 1386 } 1367 1387 } … … 1371 1391 if (newlycompiled) { 1372 1392 xc_free_php(&php TSRMLS_CC); 1373 xc_sandbox_free(&sandbox, 0TSRMLS_CC);1393 xc_sandbox_free(&sandbox, XC_NoInstall TSRMLS_CC); 1374 1394 } 1375 1395 … … 1564 1584 zend_compile_file = old_compile_file; 1565 1585 old_compile_file = NULL; 1586 } 1587 1588 if (origin_compile_file) { 1589 zend_compile_file = origin_compile_file; 1590 origin_compile_file = NULL; 1566 1591 } 1567 1592 … … 2915 2940 #endif 2916 2941 /* }}} */ 2917 static startup_func_t xc_last_ext_startup = NULL;2942 static startup_func_t xc_last_ext_startup; 2918 2943 static int xc_zend_startup_last(zend_extension *extension) /* {{{ */ 2919 2944 { … … 2936 2961 { 2937 2962 xc_zend_extension_gotup = 1; 2963 2964 if (!origin_compile_file) { 2965 origin_compile_file = zend_compile_file; 2966 zend_compile_file = xc_check_initial_compile_file; 2967 } 2968 2938 2969 if (zend_llist_count(&zend_extensions) > 1) { 2939 2970 zend_llist_position lpos;

