com php-src: Opcache is assuming that op_arrays without r efcount are always efree()d We maybe should s earch for some other way, because just not re
fcounting the op_array is rather a dirty hack . If possible, we should change opcache and just expect op_array->refcount != NULL . .. but I have not
found a clean way yet .: Zend/zend_opcode.c
| From: | Bob Weinand | Date: | Wed, 22 Jul 2015 21:16:50 +0000 |
| Subject: | com php-src: Opcache is assuming that op_arrays without r efcount are always efree()d We maybe should s earch for some other way, because just not re fcounting the op_array is rather a dirty hack . If possible, we should change opcache and just expect op_array->refcount != NULL . .. but I have not found a clean way yet .: Zend/zend_opcode.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88121@lists.php.net to get a copy of this message | ||
Commit: 531fa70ba843895270a795acebaebca143704abb
Author: Bob Weinand <bobwei9@hotmail.com> Wed, 22 Jul 2015 23:16:50 +0200
Parents: 3cc02533ae2022aa987ddf4cd372afbb472e4e91
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=531fa70ba843895270a795acebaebca143704abb
Log:
Opcache is assuming that op_arrays without refcount are always efree()d
We maybe should search for some other way, because just not refcounting the op_array is rather a
dirty hack.
If possible, we should change opcache and just expect op_array->refcount != NULL ... but I have
not found a clean way yet.
Changed paths:
M Zend/zend_opcode.c
Diff:
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index b0242c80..90afc6a 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -352,7 +352,11 @@ ZEND_API zend_bool destroy_op_array(zend_op_array *op_array)
efree(op_array->run_time_cache);
}
- if (!op_array->refcount || --(*op_array->refcount) > 0) {
+ if (!op_array->refcount) {
+ return 1;
+ }
+
+ if (--(*op_array->refcount) > 0) {
return 0;
}