Skip to content

Commit 779e904

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fix refcounting
2 parents e056e2d + bb54694 commit 779e904

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

Zend/zend_execute_API.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
772772
if (EXPECTED(!must_wrap)) {
773773
ZVAL_COPY(param, arg);
774774
} else {
775+
Z_TRY_ADDREF_P(arg);
775776
ZVAL_NEW_REF(param, arg);
776777
}
777778
}

Zend/zend_vm_def.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5228,6 +5228,7 @@ ZEND_VM_C_LABEL(send_array):
52285228
if (EXPECTED(!must_wrap)) {
52295229
ZVAL_COPY(param, arg);
52305230
} else {
5231+
Z_TRY_ADDREF_P(arg);
52315232
ZVAL_NEW_REF(param, arg);
52325233
}
52335234
ZEND_CALL_NUM_ARGS(EX(call))++;
@@ -5280,6 +5281,7 @@ ZEND_VM_C_LABEL(send_array):
52805281
if (EXPECTED(!must_wrap)) {
52815282
ZVAL_COPY(param, arg);
52825283
} else {
5284+
Z_TRY_ADDREF_P(arg);
52835285
ZVAL_NEW_REF(param, arg);
52845286
}
52855287
if (!name) {

Zend/zend_vm_execute.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,6 +2123,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_O
21232123
if (EXPECTED(!must_wrap)) {
21242124
ZVAL_COPY(param, arg);
21252125
} else {
2126+
Z_TRY_ADDREF_P(arg);
21262127
ZVAL_NEW_REF(param, arg);
21272128
}
21282129
ZEND_CALL_NUM_ARGS(EX(call))++;
@@ -2175,6 +2176,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_O
21752176
if (EXPECTED(!must_wrap)) {
21762177
ZVAL_COPY(param, arg);
21772178
} else {
2179+
Z_TRY_ADDREF_P(arg);
21782180
ZVAL_NEW_REF(param, arg);
21792181
}
21802182
if (!name) {

0 commit comments

Comments
 (0)