Skip to content

Commit

Permalink
SAVE_OPLINE in NULL_HANDLER
Browse files Browse the repository at this point in the history
Let's avoid crashing before the nice error message gets printed...
  • Loading branch information
nikic committed Aug 11, 2020
1 parent f491dab commit 42eda51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Zend/zend_vm_execute.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}
Expand Down
1 change: 1 addition & 0 deletions Zend/zend_vm_gen.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 42eda51

Please sign in to comment.