1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00

fix #24635: clean hash before putting into cache

This commit is contained in:
Stanislav Malyshev
2003-07-27 12:46:14 +00:00
parent 399db3c846
commit c3c136ea4b

View File

@@ -2555,8 +2555,10 @@ int zend_do_fcall_common_helper(ZEND_OPCODE_HANDLER_ARGS)
zend_hash_destroy(EX(function_state).function_symbol_table);
FREE_HASHTABLE(EX(function_state).function_symbol_table);
} else {
*(++EG(symtable_cache_ptr)) = EX(function_state).function_symbol_table;
/* clean before putting into the cache, since clean
could call dtors, which could use cached hash */
zend_hash_clean(*EG(symtable_cache_ptr));
*(++EG(symtable_cache_ptr)) = EX(function_state).function_symbol_table;
}
EG(active_symbol_table) = calling_symbol_table;
} else { /* ZEND_OVERLOADED_FUNCTION */