From 3e89c883bbfc1c67ff356b547046f2d7f7325058 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 30 Oct 2015 14:53:53 +0300 Subject: Changed ZEND_CLONE->extended_value meaning to relative offset (previously it was absolute opline number) --- ext/opcache/Optimizer/zend_optimizer.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ext/opcache/Optimizer/zend_optimizer.c') diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c index f37b5f7241..b4bc971286 100644 --- a/ext/opcache/Optimizer/zend_optimizer.c +++ b/ext/opcache/Optimizer/zend_optimizer.c @@ -516,6 +516,10 @@ static void zend_accel_optimize(zend_op_array *op_array, case ZEND_DECLARE_ANON_INHERITED_CLASS: ZEND_PASS_TWO_UNDO_JMP_TARGET(op_array, opline, ZEND_OP1(opline)); break; + case ZEND_CATCH: + /* relative offset into absolute index */ + opline->extended_value = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value); + break; case ZEND_JMPZNZ: /* relative offset into absolute index */ opline->extended_value = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value); @@ -560,6 +564,10 @@ static void zend_accel_optimize(zend_op_array *op_array, case ZEND_DECLARE_ANON_INHERITED_CLASS: ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, ZEND_OP1(opline)); break; + case ZEND_CATCH: + /* absolute index to relative offset */ + opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline->extended_value); + break; case ZEND_JMPZNZ: /* absolute index to relative offset */ opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline->extended_value); -- cgit v1.2.1