How to create Persistent zval?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am trying to store a zval object into the persistent list in zend VM. (Using EG(persistent_list) and zend_rscd_list_entry)

Which works fine if I store/fetch the zval in the same request context.

But it seems that zend engine cleans up the zval object after the request, when the next request comes, the fetched list entry points to a freed zval address and it makes php segmentationfault. I guess zval is allocated by emalloc, so I cant keep it cross requests?

Is there a way to keep a zval persistent in the persistent_list? Or how do I deeply clone an object in extension and make it persistent?

Thanks,
Yo-An Lin
http://github.com/c9s
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux