Skip to content

Commit 0d5191f

Browse files
committed
Revert "Properly release zend_ast_op_array in OPcache"
This reverts commit 345834b.
1 parent 345834b commit 0d5191f

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

ext/opcache/zend_persist.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,6 @@ static zend_ast *zend_persist_ast(zend_ast *ast)
190190
node = (zend_ast *) copy;
191191
} else if (ast->kind == ZEND_AST_OP_ARRAY) {
192192
zend_ast_op_array *copy = zend_shared_memdup(ast, sizeof(zend_ast_op_array));
193-
/* We're holding a separate reference to the op_array in the AST. Release it
194-
* early because zend_persist_op_array() is destructive. */
195-
destroy_op_array(copy->op_array);
196193
zval z;
197194
ZVAL_PTR(&z, copy->op_array);
198195
zend_persist_op_array(&z);

ext/opcache/zend_persist_calc.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,6 @@ static void zend_persist_ast_calc(zend_ast *ast)
9191
zval z;
9292
ZVAL_PTR(&z, zend_ast_get_op_array(ast)->op_array);
9393
zend_persist_op_array_calc(&z);
94-
95-
/* If op_array is shared, the function name refcount is still incremented for each use,
96-
* so we need to release it here. We remembered the original function name in xlat. */
97-
zend_string *old_function_name =
98-
zend_shared_alloc_get_xlat_entry(&zend_ast_get_op_array(ast)->op_array->function_name);
99-
if (old_function_name) {
100-
zend_string_release_ex(old_function_name, 0);
101-
}
10294
} else if (ast->kind == ZEND_AST_CALLABLE_CONVERT) {
10395
ADD_SIZE(sizeof(zend_ast_fcc));
10496
} else if (zend_ast_is_decl(ast)) {

0 commit comments

Comments
 (0)