Skip to content

Commit 42eda51

Browse files
committed
SAVE_OPLINE in NULL_HANDLER
Let's avoid crashing before the nice error message gets printed...
1 parent f491dab commit 42eda51

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Zend/zend_vm_execute.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49860,6 +49860,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NULL_HANDLER(ZEND_OPCODE_HANDL
4986049860
{
4986149861
USE_OPLINE
4986249862

49863+
SAVE_OPLINE();
4986349864
zend_error_noreturn(E_ERROR, "Invalid opcode %d/%d/%d.", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type);
4986449865
ZEND_VM_NEXT_OPCODE(); /* Never reached */
4986549866
}

Zend/zend_vm_gen.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,6 +1514,7 @@ function gen_null_handler($f) {
15141514
out($f,"{\n");
15151515
out($f,"\tUSE_OPLINE\n");
15161516
out($f,"\n");
1517+
out($f,"\tSAVE_OPLINE();\n");
15171518
out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type);\n");
15181519
out($f,"\tZEND_VM_NEXT_OPCODE(); /* Never reached */\n");
15191520
out($f,"}\n\n");

0 commit comments

Comments
 (0)