mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-26 10:25:41 +00:00
Fix include/eval with custom zend_execute
This commit is contained in:
1 parent
8a14276701
commit
ead8a6636d
2 files changed
+16
-4
No files matched your search
+5
-2
@@ -1751,8 +1751,9 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
|
||||
zend_bool nested = EX(nested);
|
||||
zend_op_array *op_array = EX(op_array);
|
||||
|
||||
if ((nested && EX(prev_execute_data)->opline->opcode == ZEND_INCLUDE_OR_EVAL) ||
|
||||
EG(active_symbol_table) == &EG(symbol_table)) {
|
||||
if ((EX(prev_execute_data) && EX(prev_execute_data)->opline
|
||||
&& EX(prev_execute_data)->opline->opcode == ZEND_INCLUDE_OR_EVAL)
|
||||
|| EG(active_symbol_table) == &EG(symbol_table)) {
|
||||
zend_detach_symbol_table(TSRMLS_C);
|
||||
}
|
||||
|
||||
@@ -3900,6 +3901,8 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
|
||||
zend_execute(new_op_array, return_value TSRMLS_CC);
|
||||
}
|
||||
|
||||
zend_attach_symbol_table(TSRMLS_C);
|
||||
|
||||
EX(function_state).function = (zend_function *) EX(op_array);
|
||||
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
|
||||
+11
-2
@@ -386,8 +386,9 @@ static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
|
||||
zend_bool nested = EX(nested);
|
||||
zend_op_array *op_array = EX(op_array);
|
||||
|
||||
if ((nested && EX(prev_execute_data)->opline->opcode == ZEND_INCLUDE_OR_EVAL) ||
|
||||
EG(active_symbol_table) == &EG(symbol_table)) {
|
||||
if ((EX(prev_execute_data) && EX(prev_execute_data)->opline
|
||||
&& EX(prev_execute_data)->opline->opcode == ZEND_INCLUDE_OR_EVAL)
|
||||
|| EG(active_symbol_table) == &EG(symbol_table)) {
|
||||
zend_detach_symbol_table(TSRMLS_C);
|
||||
}
|
||||
|
||||
@@ -2930,6 +2931,8 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
|
||||
zend_execute(new_op_array, return_value TSRMLS_CC);
|
||||
}
|
||||
|
||||
zend_attach_symbol_table(TSRMLS_C);
|
||||
|
||||
EX(function_state).function = (zend_function *) EX(op_array);
|
||||
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
@@ -7878,6 +7881,8 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
|
||||
zend_execute(new_op_array, return_value TSRMLS_CC);
|
||||
}
|
||||
|
||||
zend_attach_symbol_table(TSRMLS_C);
|
||||
|
||||
EX(function_state).function = (zend_function *) EX(op_array);
|
||||
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
@@ -12868,6 +12873,8 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
|
||||
zend_execute(new_op_array, return_value TSRMLS_CC);
|
||||
}
|
||||
|
||||
zend_attach_symbol_table(TSRMLS_C);
|
||||
|
||||
EX(function_state).function = (zend_function *) EX(op_array);
|
||||
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
@@ -29388,6 +29395,8 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
|
||||
zend_execute(new_op_array, return_value TSRMLS_CC);
|
||||
}
|
||||
|
||||
zend_attach_symbol_table(TSRMLS_C);
|
||||
|
||||
EX(function_state).function = (zend_function *) EX(op_array);
|
||||
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
|
||||
Reference in new issue
Block a user