Re: [PHP-DEV] Bug in zend_hash_init()

2011-04-28 Thread Antony Dovgal
On 04/28/2011 02:53 PM, Anton Dobkin wrote: // No checking on return value? Yes, it doesn't check for NULL. See ecalloc() sources in Zend/zend_alloc.c around line 2434 to see why. -- Wbr, Antony Dovgal --- http://pinba.org - realtime statistics for PHP -- PHP Internals - PHP Runtime Developme

[PHP-DEV] Bug in zend_hash_init()

2011-04-28 Thread Anton Dobkin
Hi, In function zend_hash_init() when allocate no persistent memory (if flag persistent is 0) for arBuckets element of struct HashTable and virtual memory is over, the function always returns SUCCESS Code: if (persistent) { tmp = (Bucket **) calloc(ht->nTableSize, sizeof(Bucket *)); if (