@@ -4817,23 +4817,21 @@ static void cleanup_live_vars_range(zend_execute_data *execute_data, uint32_t ra
48174817 }
48184818 zval_ptr_dtor_nogc (var );
48194819 } else if (kind == ZEND_LIVE_ROPE ) {
4820- // Not sure about op_num...
4821- ZEND_UNREACHABLE ();
4822- // zend_string **rope = (zend_string **)var;
4823- // zend_op *last = EX(func)->op_array.opcodes + op_num;
4824- // while ((last->opcode != ZEND_ROPE_ADD && last->opcode != ZEND_ROPE_INIT)
4825- // || last->result.var != var_num) {
4826- // ZEND_ASSERT(last >= EX(func)->op_array.opcodes);
4827- // last--;
4828- // }
4829- // if (last->opcode == ZEND_ROPE_INIT) {
4830- // zend_string_release_ex(*rope, 0);
4831- // } else {
4832- // int j = last->extended_value;
4833- // do {
4834- // zend_string_release_ex(rope[j], 0);
4835- // } while (j--);
4836- // }
4820+ zend_string * * rope = (zend_string * * )var ;
4821+ zend_op * last = EX (func )-> op_array .opcodes + range_end ;
4822+ while ((last -> opcode != ZEND_ROPE_ADD && last -> opcode != ZEND_ROPE_INIT )
4823+ || last -> result .var != var_num ) {
4824+ ZEND_ASSERT (last >= EX (func )-> op_array .opcodes );
4825+ last -- ;
4826+ }
4827+ if (last -> opcode == ZEND_ROPE_INIT ) {
4828+ zend_string_release_ex (* rope , 0 );
4829+ } else {
4830+ int j = last -> extended_value ;
4831+ do {
4832+ zend_string_release_ex (rope [j ], 0 );
4833+ } while (j -- );
4834+ }
48374835 } else if (kind == ZEND_LIVE_SILENCE ) {
48384836 /* restore previous error_reporting value */
48394837 if (E_HAS_ONLY_FATAL_ERRORS (EG (error_reporting ))
0 commit comments