diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2015-11-13 15:35:07 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2015-11-13 15:35:07 +0300 |
| commit | 3a5fa926bfc409963f500144ea6d5e890e712a86 (patch) | |
| tree | f213ba3fd5557e6f4f7418c18451e851983d5dbe /Zend/zend_execute.c | |
| parent | cbe906226aeafb1d3e4b47744ceaff47ab130be2 (diff) | |
| download | php-git-3a5fa926bfc409963f500144ea6d5e890e712a86.tar.gz | |
Squashed commit of the following:
commit afe963e6cc289696e60c6c679796ba2197c52b3b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Nov 13 15:32:29 2015 +0300
Added news entry
commit a126b891c97848dd7ef8f1abf716328c46e0f19c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Nov 13 15:29:21 2015 +0300
VERIFY_RETURN_TYPE doesn't have to cleanup operand on exception, bacause now, live temporary variables are released by exception unwinder.
commit 0db475e98786e6bcaa8401ee3e0b33743b9a2f2b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Nov 12 22:55:39 2015 +0300
Fixed copy/paste
commit 0ac73fe7174bec9de9a610319a98b259bea67f7f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Nov 11 16:11:50 2015 +0300
Fixed bug #62210 (Exceptions can leak temporary variables)
Diffstat (limited to 'Zend/zend_execute.c')
| -rw-r--r-- | Zend/zend_execute.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index c0c9271f4b..aa48b06767 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2556,18 +2556,18 @@ static void cleanup_live_vars(zend_execute_data *execute_data, uint32_t op_num, break; } else if (op_num < range->end) { if (!catch_op_num || catch_op_num >= range->end) { - zend_op *opline = &EX(func)->op_array.opcodes[range->end]; - uint32_t var_num = opline->op1.var; + uint32_t kind = range->var & ZEND_LIVE_MASK; + uint32_t var_num = range->var & ~ZEND_LIVE_MASK; zval *var = EX_VAR(var_num); - if (opline->opcode == ZEND_FREE) { + if (kind == ZEND_LIVE_TMPVAR) { zval_ptr_dtor_nogc(var); - } else if (opline->opcode == ZEND_FE_FREE) { + } else if (kind == ZEND_LIVE_LOOP) { if (Z_TYPE_P(var) != IS_ARRAY && Z_FE_ITER_P(var) != (uint32_t)-1) { zend_hash_iterator_del(Z_FE_ITER_P(var)); } zval_ptr_dtor_nogc(var); - } else if (opline->opcode == ZEND_ROPE_END) { + } else if (kind == ZEND_LIVE_ROPE) { zend_string **rope = (zend_string **)var; zend_op *last = EX(func)->op_array.opcodes + op_num; while ((last->opcode != ZEND_ROPE_ADD && last->opcode != ZEND_ROPE_INIT) @@ -2583,7 +2583,7 @@ static void cleanup_live_vars(zend_execute_data *execute_data, uint32_t op_num, zend_string_release(rope[j]); } while (j--); } - } else if (opline->opcode == ZEND_END_SILENCE) { + } else if (kind == ZEND_LIVE_SILENCE) { /* restore previous error_reporting value */ if (!EG(error_reporting) && Z_LVAL_P(var) != 0) { EG(error_reporting) = Z_LVAL_P(var); |
