diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2015-09-24 20:33:37 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2015-09-24 20:33:57 +0200 |
commit | 808f62bb4d9812e9b7b35c87f3e90e5fc2bc244b (patch) | |
tree | bf119929df953c739cf85e00d6da901957bbd41c /Zend/zend_vm_execute.h | |
parent | 0fd7acd11d4a8cdb6afafabd9eb7eef8385cd067 (diff) | |
download | php-git-808f62bb4d9812e9b7b35c87f3e90e5fc2bc244b.tar.gz |
Ensure proper exception handling and EX(opline) state in USER_OPCODE handler
Diffstat (limited to 'Zend/zend_vm_execute.h')
-rw-r--r-- | Zend/zend_vm_execute.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index eeaf27930d..ea01110d96 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1563,10 +1563,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_USER_OPCODE_SPEC_HANDLER(ZEND_ SAVE_OPLINE(); ret = zend_user_opcode_handlers[opline->opcode](execute_data); - LOAD_OPLINE(); + + if (EG(exception)) { + HANDLE_EXCEPTION(); + } switch (ret) { case ZEND_USER_OPCODE_CONTINUE: + LOAD_OPLINE(); ZEND_VM_CONTINUE(); case ZEND_USER_OPCODE_RETURN: if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR) != 0)) { @@ -1581,8 +1585,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_USER_OPCODE_SPEC_HANDLER(ZEND_ case ZEND_USER_OPCODE_LEAVE: ZEND_VM_LEAVE(); case ZEND_USER_OPCODE_DISPATCH: + ZEND_ASSERT(EX(opline) == opline); ZEND_VM_DISPATCH(opline->opcode, opline); default: + ZEND_ASSERT(EX(opline) == opline); ZEND_VM_DISPATCH((zend_uchar)(ret & 0xff), opline); } } |