mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
parent
3962f00b01
commit
44b86aee31
2 changed files with 22 additions and 0 deletions
|
@ -5335,6 +5335,10 @@ static int zend_jit_long_math_helper(dasm_State **Dst,
|
|||
|.if not(X64)
|
||||
| add r4, 12
|
||||
|.endif
|
||||
if (op1_addr == res_addr && (op2_info & MAY_BE_RCN)) {
|
||||
/* compound assignment may decrement "op2" refcount */
|
||||
op2_info |= MAY_BE_RC1;
|
||||
}
|
||||
| FREE_OP op1_type, op1, op1_info, 0, opline
|
||||
| FREE_OP op2_type, op2, op2_info, 0, opline
|
||||
if (may_throw) {
|
||||
|
|
18
ext/opcache/tests/jit/and_002.phpt
Normal file
18
ext/opcache/tests/jit/and_002.phpt
Normal file
|
@ -0,0 +1,18 @@
|
|||
--TEST--
|
||||
JIT BW_AND: 002 (memory leak)
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.file_update_protection=0
|
||||
opcache.jit_buffer_size=1M
|
||||
--FILE--
|
||||
<?php
|
||||
function t($a) {
|
||||
for($i = 0; $i < 2; $i++)
|
||||
$a &= $a = $a;
|
||||
}
|
||||
t("");
|
||||
?>
|
||||
DONE
|
||||
--EXPECTF--
|
||||
DONE
|
Loading…
Add table
Add a link
Reference in a new issue