Skip to content

Commit c70bab7

Browse files
committed
Merge branch 'PHP-7.4'
2 parents e5af673 + 0a24cd4 commit c70bab7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4344,8 +4344,9 @@ static int accel_preload(const char *config)
43444344
if (op_array->static_variables) {
43454345
HashTable *ht = ZEND_MAP_PTR_GET(op_array->static_variables_ptr);
43464346
if (ht) {
4347-
ZEND_ASSERT(GC_REFCOUNT(ht) == 1);
4348-
zend_array_destroy(ht);
4347+
if (GC_DELREF(ht) == 0) {
4348+
zend_array_destroy(ht);
4349+
}
43494350
ZEND_MAP_PTR_SET(op_array->static_variables_ptr, NULL);
43504351
}
43514352
}

ext/opcache/tests/preload_bug78175_2.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ class Loader {
1515
}
1616
}
1717

18+
class ExtLoader extends Loader {
19+
}
20+
1821
Loader::getLoader();
1922
Loader::getCounter();
2023
Loader::getCounter();

0 commit comments

Comments
 (0)