refcount/is_ref commit
| From: | Gopal V | Date: | Thu, 28 Dec 2006 10:16:48 +0000 |
| Subject: | refcount/is_ref commit | ||
| Groups: | php.apc.dev | ||
| Request: | Send a blank email to php-apc-dev+get-37@lists.php.net to get a copy of this message | ||
Hi,
Looking at (http://news.php.net/php.pecl.cvs/6820)
- /* deep-copying ensures that there is only one reference to this in memory */ - (*dst)->refcount = 1; - (*dst)->is_ref = 0; + (*dst)->refcount = (*src)->refcount; + (*dst)->is_ref = (*src)->is_ref;That could be a problem. When you copy *from* shm land, the zval->refcount used to be 1 because we never had circular references before. So this *might* leak (need more time to debug this), but there's another inconsistent part that might be more important. Because you call my_copy_zval() before you reset this, the refcount++ inside that function is over-written with the src->refcount. Cheers, Gopal PS: every time *I* start working on apc, something like this ruins my
day too :)
--
You can't teach people to be lazy - either they have it, or they don't.