Re: Re: zend_register_list_destructors_ex problem
| From: | Wez Furlong | Date: | Fri, 26 Aug 2005 03:09:03 +0000 |
| Subject: | Re: Re: zend_register_list_destructors_ex problem | ||
| References: | 1 2 3 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-2800@lists.php.net to get a copy of this message | ||
My guess is that you have a global variable that you're keeping around
too long, and/or that you're not NULL'ing out when you're finished
with it.
Without further code samples, we have no idea.
I suggest that you try using valgrind; it's very useful for detecting
these kinds of mistakes.
--Wez.
On 8/25/05, Sean <sean@reinvigorate.net> wrote:
> Thanks for the reply Sara. The following code seems to have the same effect
> I just found-
>
> le_restype = zend_register_list_destructors_ex(NULL, NULL, "My Resource
> Object", module_number);
>
> I'm not even creating any resources yet, just registering my type of
> resource with zend. So the script will fail on the dl function that loads
> the shared object.
>
> When I run the script from the command line it finishes the script to
> completion then prints this-
>
> /root/php-5.0.4/Zend/zend_hash.c(678) : ht=0x82e73dc is already destroyed
> /root/php-5.0.4/Zend/zend_hash.c(678) : ht=0x82e73dc is already destroyed
> /root/php-5.0.4/Zend/zend_hash.c(67) : Bailed out without a bailout address!
>
> I have no idea why it'd be doing this. As a sanity check I just made a new
> extension from scratch using ext_skel and it does the same thing when I use
> zend_register_list_destructors_ex. Once I remove that line everything works
> great.
>
> Thanks again so much
>
> Sean
>
>
> ""Sara Golemon"" <pollita@php.net> wrote in message
> news:010001c5a9c4$435a1b30$5c8be5a9@ohr.berkeley.edu...
> >> Here's my code that resides in my PHP_MINIT_FUNCTION-
> >>
> >> le_restype = zend_register_list_destructors_ex(free_res, NULL, "My
> > Resource
> >> Object", module_number);
> >>
> >> Does anyone have any insight on why this may be happening?
> >>
> > Not from just that amount of code, no.
> >
> > We'd need to see the destructor at the least, preferrably the resource
> > generation code too....
> >
> > -Sara
>
> --
> PECL development discussion Mailing List (http://pecl.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>