]> granicus.if.org Git - php/commitdiff
SAVE_OPLINE in NULL_HANDLER
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 11 Aug 2020 13:14:50 +0000 (15:14 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 11 Aug 2020 13:14:50 +0000 (15:14 +0200)
Let's avoid crashing before the nice error message gets printed...

Zend/zend_vm_execute.h
Zend/zend_vm_gen.php

index e564ec3c18ab69e3feccd62852466c0d49a3a473..f103e91d331a523319386c38fa40ac8420c7d6ac 100644 (file)
@@ -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 */
 }
index aa70a6311373ea14c10feff2496188669097bf1f..d05c278c17f8550ac977cda577ae5020ed78e8da 100755 (executable)
@@ -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");