From 42eda5160d53955ff35bfc5d776fb5a5ea1c992f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 11 Aug 2020 15:14:50 +0200 Subject: SAVE_OPLINE in NULL_HANDLER Let's avoid crashing before the nice error message gets printed... --- Zend/zend_vm_execute.h | 1 + Zend/zend_vm_gen.php | 1 + 2 files changed, 2 insertions(+) (limited to 'Zend') diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index e564ec3c18..f103e91d33 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -49860,6 +49860,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NULL_HANDLER(ZEND_OPCODE_HANDL { USE_OPLINE + SAVE_OPLINE(); zend_error_noreturn(E_ERROR, "Invalid opcode %d/%d/%d.", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type); ZEND_VM_NEXT_OPCODE(); /* Never reached */ } diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index aa70a63113..d05c278c17 100755 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -1514,6 +1514,7 @@ function gen_null_handler($f) { out($f,"{\n"); out($f,"\tUSE_OPLINE\n"); out($f,"\n"); + out($f,"\tSAVE_OPLINE();\n"); out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type);\n"); out($f,"\tZEND_VM_NEXT_OPCODE(); /* Never reached */\n"); out($f,"}\n\n"); -- cgit v1.2.1