My question is about HashTable:
The PHP VERSION debugged is PHP-7.0.12, i coundn't find out where the zval's str member is updated within the macro "ZVAL_COPY_VALUE(z, v)" when i add one new string, however it indeed updated successfuly by GDB trcacing the macro context, that is to say, the zval's str member within the Bucket struct indeed had got the string address.
Expand the macro then finally get the code as follow:
zval *_z1 = z;
const zval *_z2 = v;
zend_refcounted *_gc = (*_z2).value.counted
uint32_t _t = (*_z2).u1.type_info;
uint32_t _w2 = _z2->value.ww.w2;
(*_z1).value.counted = _gc;
_z1->value.ww.w2 = _w2;
(*_z1).u1.type_info = _t;
Any help will be appreciated very much, thks.
question from:
https://stackoverflow.com/questions/65858459/why-the-marco-zval-copy-valuez-v-seems-to-work-unexpectly-in-php-internal 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…