For Programmers: Free Programming Magazines  


Home > Archive > PHP Zend Engine > August 2006 > cvs: ZendEngine2(PHP_5_2) / zend_hash.c php-src NEWS









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: ZendEngine2(PHP_5_2) / zend_hash.c php-src NEWS
Dmitry Stogov

2006-08-24, 7:56 am

dmitry Thu Aug 24 09:42:35 2006 UTC

Modified files: (Branch: PHP_5_2)
/php-src NEWS
/ZendEngine2 zend_hash.c
Log:
Fixed bug #38315 (Constructing in the destructor causes weird behaviour)


http://cvs.php.net/viewvc.cgi/php-s...9&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.218 php-src/NEWS:1.2027.2.547.2.219
--- php-src/NEWS:1.2027.2.547.2.218 Thu Aug 24 06:18:30 2006
+++ php-src/NEWS Thu Aug 24 09:42:35 2006
@@ -16,6 +16,8 @@
(Ilia)
- Fixed bug #38488 (Access to "php://stdin" and family crashes PHP on win32).
(Dmitry)
+- Fixed bug #38315 (Constructing in the destructor causes weird behaviour).
+ (Dmitry)
- Fixed bug #38265 (heap corruption). (Dmitry)
- Fixed PECL bug #8112 (OCI8 persistent connections misbehave when Apache
process times out). (Tony)
http://cvs.php.net/viewvc.cgi/ZendE...1&diff_format=u
Index: ZendEngine2/zend_hash.c
diff -u ZendEngine2/zend_hash.c:1.121.2.4 ZendEngine2/zend_hash.c:1.121.2.4.2.1
--- ZendEngine2/zend_hash.c:1.121.2.4 Fri Apr 7 10:06:21 2006
+++ ZendEngine2/zend_hash.c Thu Aug 24 09:42:35 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/

-/* $Id: zend_hash.c,v 1.121.2.4 2006/04/07 10:06:21 dmitry Exp $ */
+/* $Id: zend_hash.c,v 1.121.2.4.2.1 2006/08/24 09:42:35 dmitry Exp $ */

#include "zend.h"

@@ -571,15 +571,6 @@
Bucket *retval;

HANDLE_BLOCK_INTERRUPTIONS();
-
- if (ht->pDestructor) {
- ht->pDestructor(p->pData);
- }
- if (p->pData != &p->pDataPtr) {
- pefree(p->pData, ht->persistent);
- }
- retval = p->pListNext;
-
if (p->pLast) {
p->pLast->pNext = p->pNext;
} else {
@@ -608,9 +599,17 @@
if (ht->pInternalPointer == p) {
ht->pInternalPointer = p->pListNext;
}
- pefree(p, ht->persistent);
- HANDLE_UNBLOCK_INTERRUPTIONS();
ht->nNumOfElements--;
+ HANDLE_UNBLOCK_INTERRUPTIONS();
+
+ if (ht->pDestructor) {
+ ht->pDestructor(p->pData);
+ }
+ if (p->pData != &p->pDataPtr) {
+ pefree(p->pData, ht->persistent);
+ }
+ retval = p->pListNext;
+ pefree(p, ht->persistent);

return retval;
}
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com