]> granicus.if.org Git - php/commitdiff
Assert no exception if using NEXT_OPCODE()
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 7 Jul 2020 09:34:43 +0000 (11:34 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 7 Jul 2020 09:34:43 +0000 (11:34 +0200)
When NEXT_OPCODE() is used instead of NEXT_OPCODE_CHECK_EXCEPTION(),
assert that there is indeed no exception.

Zend/zend_execute.c

index 4efb80bc72880a3c6502df539c4c3400012ea5b7..fcd2a437e668ce3acae00278d67b709f9195f6b5 100644 (file)
@@ -4319,6 +4319,7 @@ static zend_always_inline zend_execute_data *_zend_vm_stack_push_call_frame(uint
        if (check_exception) { \
                OPLINE = EX(opline) + (skip); \
        } else { \
+               ZEND_ASSERT(!EG(exception)); \
                OPLINE = opline + (skip); \
        } \
        ZEND_VM_CONTINUE()