Hi All,
I could not understand one piece of code in PHP 5.0 RC3.
File Zend/zend.c
function compiler_globals_ctor()

Here we copy global_class_table to thread specific compiler_globals's
class_table.
For this we use zend_hash_copy which is a generic function used by many
types.
As of my knowledge our class table HashTable structure is structured as,
key = char*
value = zend_class_entry **
If it is the case how this zend_hash_copy will work?
As I could see zend_hash_copy calls zend_hash_add_or_update with data as
the bucket's pData which is void* and semantically zend_class_entry **
and memcpy of INIT_DATA macro tries to copy from whatever pData points
to (zend_class_entry**) till sizeof(zend_class_entry)=292 bytes which is
wrong shoudl cause seg fault ideally.

Please clarify.

With regards
Kamesh Jayachandran

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to