Re: [PHP-DEV] Question about zend_hash.c, UPDATE_DATA macro

2003-07-30 Thread Andi Gutmans
Sure, but I want to first make sure that the fix is OK. At 01:14 AM 7/31/2003 +0300, Jani Taskinen wrote: This same problem likely exists in ZE1 too? Are you gonna fix it there? --Jani On Wed, 30 Jul 2003, Andi Gutmans wrote: >Yes you are right. There indeed seems to be some flaw in

Re: [PHP-DEV] Question about zend_hash.c, UPDATE_DATA macro

2003-07-30 Thread Jani Taskinen
This same problem likely exists in ZE1 too? Are you gonna fix it there? --Jani On Wed, 30 Jul 2003, Andi Gutmans wrote: >Yes you are right. There indeed seems to be some flaw in the logic. I'll >commit a fix in a few minutes. >Please test it and let me know if it fixes yo

Re: [PHP-DEV] Question about zend_hash.c, UPDATE_DATA macro

2003-07-30 Thread Andi Gutmans
Yes you are right. There indeed seems to be some flaw in the logic. I'll commit a fix in a few minutes. Please test it and let me know if it fixes your problems. Thanks, Andi At 02:50 PM 7/29/2003 +0300, Vesselin Atanasov wrote: Hello. In PHP5, file zend_hash.c there is a macro #define UPDATE_D

Re: [PHP-DEV] Question about zend_hash.c, UPDATE_DATA macro

2003-07-29 Thread Vesselin Atanasov
Hello. Yes. They are different sizes both != sizeof (void *) and second update is bigger than first, then memory block of first update will be reused, but it will not be big enough for second update. Is it a valid scenario? vesselin > Just to make sure I understand what you're asking, are your

Re: [PHP-DEV] Question about zend_hash.c, UPDATE_DATA macro

2003-07-29 Thread Andi Gutmans
Just to make sure I understand what you're asking, are your first and second updates of data with different sizes? Andi At 02:50 PM 7/29/2003 +0300, Vesselin Atanasov wrote: Hello. In PHP5, file zend_hash.c there is a macro #define UPDATE_DATA(ht, p, pData, nDataSize) \ if (nDataSize ==

Re: [PHP-DEV] Question about zend_hash.c, UPDATE_DATA macro

2003-07-29 Thread Wez Furlong
I think I brought this up here before too. I can't remember the outcome - would you mind looking through the archives? --Wez. > The macro is used to update a hash table element in > zend_hash_add_or_update(). But it seems to me that if p->pData already > points to a > data block that hash size !=

[PHP-DEV] Question about zend_hash.c, UPDATE_DATA macro

2003-07-29 Thread Vesselin Atanasov
Hello. In PHP5, file zend_hash.c there is a macro #define UPDATE_DATA(ht, p, pData, nDataSize) \ if (nDataSize == sizeof(void*)) { \ if (!(p)->pDataPtr) { \ pefree((p)->pData, (ht)->persistent); \ } \ memcpy(&(p)->pDat