php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch bug69090.diff for opcache Bug #69090Patch version 2016-11-15 15:11 UTC Return to Bug #69090 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions: 2016-11-15 15:37 UTC | 2016-11-15 15:11 UTCDeveloper: dmitry@php.netLine 86 (now 86), was 48 lines, now 40 lines /* preallocated shared-memory block to save current script */ void *mem; /* cache to save hash lookup on the same INCLUDE opcode */ diff --git a/ext/opcache/zend_accelerator_hash.c b/ext/opcache/zend_accelerator_hash.c index 992885f..4b8b712 100644 index 992885f..32e9af7 100644 --- a/ext/opcache/zend_accelerator_hash.c +++ b/ext/opcache/zend_accelerator_hash.c @@ -86,6 +86,9 @@ zend_accel_hash_entry* zend_accel_hash_update(zend_accel_hash *accel_hash, char @@ -86,6 +86,7 @@ zend_accel_hash_entry* zend_accel_hash_update(zend_accel_hash *accel_hash, char } hash_value = zend_inline_hash_func(key, key_length); +#ifndef ZEND_WIN32 + hash_value ^= ZCG(root_hash); +#endif index = hash_value % accel_hash->max_num_entries; /* try to see if the element already exists in the hash */ @@ -147,6 +150,9 @@ void* zend_accel_hash_find(zend_accel_hash *accel_hash, char *key, zend_uint key @@ -147,6 +148,7 @@ void* zend_accel_hash_find(zend_accel_hash *accel_hash, char *key, zend_uint key zend_accel_hash_entry *entry; hash_value = zend_inline_hash_func(key, key_length); +#ifndef ZEND_WIN32 + hash_value ^= ZCG(root_hash); +#endif index = hash_value % accel_hash->max_num_entries; entry = accel_hash->hash_table[index]; @@ -175,6 +181,9 @@ zend_accel_hash_entry* zend_accel_hash_find_entry(zend_accel_hash *accel_hash, c @@ -175,6 +177,7 @@ zend_accel_hash_entry* zend_accel_hash_find_entry(zend_accel_hash *accel_hash, c zend_accel_hash_entry *entry; hash_value = zend_inline_hash_func(key, key_length); +#ifndef ZEND_WIN32 + hash_value ^= ZCG(root_hash); +#endif index = hash_value % accel_hash->max_num_entries; entry = accel_hash->hash_table[index]; @@ -200,6 +209,9 @@ int zend_accel_hash_unlink(zend_accel_hash *accel_hash, char *key, zend_uint key @@ -200,6 +203,7 @@ int zend_accel_hash_unlink(zend_accel_hash *accel_hash, char *key, zend_uint key zend_accel_hash_entry *entry, *last_entry=NULL; hash_value = zend_inline_hash_func(key, key_length); +#ifndef ZEND_WIN32 + hash_value ^= ZCG(root_hash); +#endif index = hash_value % accel_hash->max_num_entries; entry = accel_hash->hash_table[index]; diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Thu Sep 19 16:01:27 2024 UTC |