File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -3933,6 +3933,22 @@ static int accel_preload(const char *config)
3933
3933
if (EG (zend_constants )) {
3934
3934
zend_string * key ;
3935
3935
zval * zv ;
3936
+
3937
+ /* Remember __COMPILER_HALT_OFFSET__(s) */
3938
+ ZEND_HASH_FOREACH_PTR (preload_scripts , script ) {
3939
+ zend_execute_data * orig_execute_data = EG (current_execute_data );
3940
+ zend_execute_data fake_execute_data ;
3941
+ zval * offset ;
3942
+
3943
+ memset (& fake_execute_data , 0 , sizeof (fake_execute_data ));
3944
+ fake_execute_data .func = (zend_function * )& script -> script .main_op_array ;
3945
+ EG (current_execute_data ) = & fake_execute_data ;
3946
+ if ((offset = zend_get_constant_str ("__COMPILER_HALT_OFFSET__" , sizeof ("__COMPILER_HALT_OFFSET__" ) - 1 )) != NULL ) {
3947
+ script -> compiler_halt_offset = Z_LVAL_P (offset );
3948
+ }
3949
+ EG (current_execute_data ) = orig_execute_data ;
3950
+ } ZEND_HASH_FOREACH_END ();
3951
+
3936
3952
ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL (EG (zend_constants ), key , zv ) {
3937
3953
zend_constant * c = Z_PTR_P (zv );
3938
3954
if (ZEND_CONSTANT_FLAGS (c ) & CONST_PERSISTENT ) {
You can’t perform that action at this time.
0 commit comments