mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Preserve return value in zend_vm_call_opcode_handler with global opline/ex registers enabled
This commit is contained in:
parent
420b745a05
commit
82b1e22b57
2 changed files with 8 additions and 2 deletions
|
@ -49553,7 +49553,10 @@ ZEND_API int zend_vm_call_opcode_handler(zend_execute_data* ex)
|
|||
LOAD_OPLINE();
|
||||
#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)
|
||||
((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
ret = (opline) ? 0 : -1;
|
||||
ret = (opline) ? execute_data != ex : -1;
|
||||
if (ret == 1 && execute_data->prev_execute_data != ex) {
|
||||
ret = 2;;
|
||||
}
|
||||
#else
|
||||
ret = ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
#endif
|
||||
|
|
|
@ -1606,7 +1606,10 @@ function gen_vm($def, $skel) {
|
|||
out($f, "\tLOAD_OPLINE();\n");
|
||||
out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)\n");
|
||||
out($f, "\t((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
|
||||
out($f, "\tret = (opline) ? 0 : -1;\n");
|
||||
out($f, "\tret = (opline) ? execute_data != ex : -1;\n");
|
||||
out($f, "\tif (ret == 1 && execute_data->prev_execute_data != ex) {\n");
|
||||
out($f, "\t\tret = 2;;\n");
|
||||
out($f, "\t}\n");
|
||||
out($f, "#else\n");
|
||||
out($f, "\tret = ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
|
||||
out($f, "#endif\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue