From ba298725d194f753c0220bd9ac482e3d257a9ddc Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 31 Jan 2018 22:39:30 +0300 Subject: Changed CATCH instruction format (extended_value moved into op2, op2 into result, result into extended_value) --- sapi/phpdbg/phpdbg_opcode.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sapi/phpdbg/phpdbg_opcode.c') diff --git a/sapi/phpdbg/phpdbg_opcode.c b/sapi/phpdbg/phpdbg_opcode.c index 313bb4fae8..4b3bf4c668 100644 --- a/sapi/phpdbg/phpdbg_opcode.c +++ b/sapi/phpdbg/phpdbg_opcode.c @@ -115,7 +115,13 @@ char *phpdbg_decode_opline(zend_op_array *ops, zend_op *opline) /*{{{ */ /* RESULT */ switch (opline->opcode) { case ZEND_CATCH: - spprintf(&decode[3], 0, "%" PRIu32, opline->result.num); + if (opline->extended_value == ZEND_LAST_CATCH) { + if (decode[2]) { + efree(decode[2]); + decode[2] = NULL; + } + } + decode[3] = phpdbg_decode_op(ops, opline, &opline->result, opline->result_type); break; default: decode[3] = phpdbg_decode_op(ops, opline, &opline->result, opline->result_type); -- cgit v1.2.1