Re: Re: [PHP-DEV] Fwd: zend_std_get_method : Address 0xffffffff is not stack'd, malloc' d or (recently) free'd
From: Kajetan Dolinar Date: Thu, 03 Apr 2014 07:29:20 +0000 Subject: Re: Re: [PHP-DEV] Fwd: zend_std_get_method : Address 0xffffffff is not stack'd, malloc' d or (recently) free'd References: 1 2 Groups: php.internals Request: Send a blank email to internals+get-73551@lists.php.net to get a copy of this message
Hi, fixed: https://gist.github.com/bukka/9936176 [3] The main problem was that you are trying to save return_value to static variable and then re-use it ( https://github.com/kdolinar/hypx-zend-bugcase/blob/master/src/hypx.c#L302 [4] ) That won't work because of GC (value can be freed in the meantime). There were also some memory leaks and missing TSRMLS that I fixed. Compare the the gist file and you will see that. I fixed just this case so the index.php works. However there might be more similar case that you need to check... JakubThanks, Jakub, very much for your insight. Yes, obviously saving a return_value into a static property was a bad idea. But how can I then create a persistent object and assign it to a static property? Here I'm after a typical singleton class where the only instance of the object is kept in a private static property. Kajetan
Thread (3 messages)
- Re: Re: [PHP-DEV] Fwd: zend_std_get_method : Address 0xffffffff is not stack'd, malloc'd or (recently) free'd
- Re: Re: [PHP-DEV] Fwd: zend std get method : Address 0xffffffff is not stack'd, malloc' d or (recently) free'd
| « previous | php.internals (#73551) | next » |
|---|