mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed memory leak
This commit is contained in:
parent
e9d1893f15
commit
c5b42be40e
2 changed files with 22 additions and 0 deletions
|
@ -6274,6 +6274,7 @@ static int zend_jit_assign_dim_op(dasm_State **Dst, const zend_op *opline, uint3
|
||||||
}
|
}
|
||||||
|
|
||||||
|9:
|
|9:
|
||||||
|
| FREE_OP opline->op2_type, opline->op2, op2_info, 0, opline
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
21
ext/opcache/tests/jit/assign_dim_op_001.phpt
Normal file
21
ext/opcache/tests/jit/assign_dim_op_001.phpt
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
--TEST--
|
||||||
|
JIT ASSIGN_DIM_OP: 001
|
||||||
|
--INI--
|
||||||
|
opcache.enable=1
|
||||||
|
opcache.enable_cli=1
|
||||||
|
opcache.file_update_protection=0
|
||||||
|
opcache.jit_buffer_size=1M
|
||||||
|
--SKIPIF--
|
||||||
|
<?php require_once('skipif.inc'); ?>
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
$x = "a";
|
||||||
|
$a[$x . "b"] = 0;
|
||||||
|
$a[$x . "b"] += 2;
|
||||||
|
var_dump($a);
|
||||||
|
?>
|
||||||
|
--EXPECT--
|
||||||
|
array(1) {
|
||||||
|
["ab"]=>
|
||||||
|
int(2)
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue