|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-05-11 12:21 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 02:00:01 2025 UTC |
Description: ------------ It seems that zend_ts_hash_clean is not actually thread-safe: it delegates to zend_hash_clean without first acquiring the write lock on the hashtable. The following patch should fix this. --- zend_ts_hash.c.orig 2007-04-16 10:27:24.000000000 -0700 +++ zend_ts_hash.c 2007-04-16 10:28:44.000000000 -0700 @@ -90,8 +90,10 @@ ZEND_API void zend_ts_hash_clean(TsHashTable *ht) { + begin_write(ht); ht->reader = 0; zend_hash_clean(TS_HASH(ht)); + end_write(ht); } ZEND_API int _zend_ts_hash_add_or_update(TsHashTable *ht, char *arKey, uint nK eyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC )