com php-src: Fixed incorrect reallocation: ext/opcache/zend_a ccelerator_util_funcs.c

From: Date: Wed, 17 Oct 2018 14:44:03 +0000
Subject: com php-src: Fixed incorrect reallocation: ext/opcache/zend_a ccelerator_util_funcs.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-103496@lists.php.net to get a copy of this message
Commit: a0a1c8990ede33b2d5b7976f1a19a82aaa226fcb Author: Dmitry Stogov <dmitry@zend.com> Wed, 17 Oct 2018 17:44:03 +0300 Parents: f307e5962f29bc098f317b8c8c7a82abd7badc83 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a0a1c8990ede33b2d5b7976f1a19a82aaa226fcb Log: Fixed incorrect reallocation Changed paths: M ext/opcache/zend_accelerator_util_funcs.c Diff: diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c index acec571..ce9f025 100644 --- a/ext/opcache/zend_accelerator_util_funcs.c +++ b/ext/opcache/zend_accelerator_util_funcs.c @@ -178,7 +178,9 @@ static void zend_hash_clone_methods(HashTable *ht, HashTable *source, zend_class new_entry->prototype = ARENA_REALLOC(new_entry->prototype); } } - ZEND_MAP_PTR_INIT(new_entry->run_time_cache, ARENA_REALLOC(ZEND_MAP_PTR(new_entry->run_time_cache))); + if (IN_ARENA(ZEND_MAP_PTR(new_entry->run_time_cache))) { + ZEND_MAP_PTR_INIT(new_entry->run_time_cache, ARENA_REALLOC(ZEND_MAP_PTR(new_entry->run_time_cache))); + } ZEND_MAP_PTR_INIT(new_entry->static_variables_ptr, &new_entry->static_variables); } }

« previous php.cvs (#103496) next »