diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-10-01 11:19:36 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-10-01 11:19:36 +0300 |
commit | 2d87b51ae9dafc4000830bdebd49d7665d0a4f6f (patch) | |
tree | 2610a5e2641e17ba8bdbcebc618a73c6dfcb8e13 /Zend/zend_objects_API.c | |
parent | 9d47cb4593972859d7bb8747f1f0b8ae56d7712e (diff) | |
parent | 4fc5833b3ebda3078911808d296e62d5baa9bf52 (diff) | |
download | php-git-2d87b51ae9dafc4000830bdebd49d7665d0a4f6f.tar.gz |
Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (29 commits)
Fix the deplister rule to not ignore the .c file (Anatol)
Update .gitignore to include the Windows deplister program (win32/build/deplister.c)
Bug > Feature Request
NEWS and UPGRADING
Fixed bug #75479
Fix test
Fix some tests and improve coverage for Windows in SPL
Use already set variable
Fix reflection arguments for sodium_memzero function
Deprecate unbinding of $this of non-static methods
Generalize compile_typename
Fixed bug #76737
Fixed bug #72635
Remove and refactor ext/spl/examples
Remove outdated soap examples
Remove unused ext/bz2/php_bz2.def
Remove redundant ce from reflection property_reference
Only store zend_type inside reflection type_reference
Fixed bug #76946
Bump versions for 7.1.24-dev
...
Diffstat (limited to 'Zend/zend_objects_API.c')
-rw-r--r-- | Zend/zend_objects_API.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c index 038ff25b4a..672a580caa 100644 --- a/Zend/zend_objects_API.c +++ b/Zend/zend_objects_API.c @@ -139,8 +139,10 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_put(zend_object *object) EG(objects_store).free_list_head = GET_OBJ_BUCKET_NUMBER(EG(objects_store).object_buckets[handle]); } else { if (EG(objects_store).top == EG(objects_store).size) { - EG(objects_store).size <<= 1; - EG(objects_store).object_buckets = (zend_object **) erealloc(EG(objects_store).object_buckets, EG(objects_store).size * sizeof(zend_object*)); + uint32_t new_size = 2 * EG(objects_store).size; + EG(objects_store).object_buckets = (zend_object **) erealloc(EG(objects_store).object_buckets, new_size * sizeof(zend_object*)); + /* Assign size after realloc, in case it fails */ + EG(objects_store).size = new_size; } handle = EG(objects_store).top++; } |