diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2017-01-24 11:32:04 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2017-01-24 11:32:41 +0100 |
commit | a1d5686a3c461f8e1b5833a14b699326b8e23987 (patch) | |
tree | 5222e43c78a3053fde5c681b958aae23a3b6dcf6 /Zend/zend_opcode.c | |
parent | 08004d7959563a58bcf166b65589e769eba2f005 (diff) | |
download | php-git-a1d5686a3c461f8e1b5833a14b699326b8e23987.tar.gz |
Fix assertion violation with composer
Diffstat (limited to 'Zend/zend_opcode.c')
-rw-r--r-- | Zend/zend_opcode.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 438feb4c91..7c79703338 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -151,7 +151,14 @@ ZEND_API void zend_function_dtor(zval *zv) ZEND_API void zend_cleanup_op_array_data(zend_op_array *op_array) { if (op_array->static_variables && - !(GC_FLAGS(op_array->static_variables) & IS_ARRAY_IMMUTABLE)) { + !(GC_FLAGS(op_array->static_variables) & IS_ARRAY_IMMUTABLE) + ) { + /* The static variables are initially shared when inheriting methods and will + * be separated on first use. If they are never used, they stay shared. Cleaning + * a shared static variables table is safe, as the intention is to clean all + * such tables. */ + HT_ALLOW_COW_VIOLATION(op_array->static_variables); + zend_hash_clean(op_array->static_variables); } } |