Skip to content

Commit 518cf60

Browse files
test
1 parent 0eae2d9 commit 518cf60

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/scheduler.c

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ static zend_always_inline int php_parallel_scheduler_list_delete(void *lhs, void
3333
static void php_parallel_schedule_free_function(zend_function *function) {
3434
if (function->op_array.static_variables) {
3535
php_parallel_copy_hash_dtor(function->op_array.static_variables, 1);
36+
ZEND_MAP_PTR_SET(function->op_array.static_variables_ptr, NULL);
37+
function->op_array.static_variables = NULL;
3638
}
3739

3840
#if PHP_VERSION_ID >= 80100
@@ -245,6 +247,8 @@ static void php_parallel_scheduler_clean(zend_function *function) {
245247

246248
if (!(GC_FLAGS(statics) & IS_ARRAY_IMMUTABLE)) {
247249
zend_array_destroy(statics);
250+
ZEND_MAP_PTR_SET(function->op_array.static_variables_ptr, NULL);
251+
function->op_array.static_variables = NULL;
248252
}
249253
}
250254

0 commit comments

Comments
 (0)