Welcome! Log In Create A New Profile

Advanced

[PHP-DEV] Remove memory leak in PHP5.4 for bug 55971

Posted by Pierrick Charron 
Pierrick Charron
[PHP-DEV] Remove memory leak in PHP5.4 for bug 55971
January 20, 2012 04:40AM
Hi Stas,

I did run the test of bug #55871 and got memory leaks. This patch
remove them. Could you please review the patch and if it is Ok i'll
commit it to 5.4

Thanks
Pierrick
Index: NEWS
===================================================================
--- NEWS (revision 322482)
+++ NEWS (working copy)
@@ -2,6 +2,9 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Jan 2012, PHP 5.4.0

+- Standard:
+ . Fixed memory leak in substr_replace. (Pierrick)
+
19 Jan 2012, PHP 5.4.0 RC6

- Core:
Index: ext/standard/string.c
===================================================================
--- ext/standard/string.c (revision 322482)
+++ ext/standard/string.c (working copy)
@@ -2518,6 +2518,9 @@

if(Z_REFCOUNT_P(orig_str) != refcount) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument was modified while replacing");
+ if(Z_TYPE_PP(tmp_repl) != IS_STRING) {
+ zval_dtor(repl_str);
+ }
break;
}

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Stas Malyshev
Re: [PHP-DEV] Remove memory leak in PHP5.4 for bug 55971
January 20, 2012 08:20AM
Hi!

> I did run the test of bug #55871 and got memory leaks. This patch
> remove them. Could you please review the patch and if it is Ok i'll
> commit it to 5.4

Please hold it for now. It's not a critical issue, if we'd have another
RC for different reason, we can also have it in as it doesn't look to
dangerous.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Pierrick Charron
Re: [PHP-DEV] Remove memory leak in PHP5.4 for bug 55971
January 20, 2012 02:11PM
Ok i'll only commit it on trunk and 5.3 for right now and keep the
patch ready to apply. What about the other one I sent you (60809) ?

On 20 January 2012 02:10, Stas Malyshev <[email protected]> wrote:
> Hi!
>
>
>> I did run the test of bug #55871 and got memory leaks. This patch
>> remove them. Could you please review the patch and if it is Ok i'll
>> commit it to 5.4
>
>
> Please hold it for now. It's not a critical issue, if we'd have another RC
> for different reason, we can also have it in as it doesn't look to
> dangerous.
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Pierrick Charron
Re: [PHP-DEV] Remove memory leak in PHP5.4 for bug 55971
January 20, 2012 02:20PM
Nevery mind. Apparently Dmitry committed a patch for this one.

P.

On 20 January 2012 08:04, Pierrick Charron <[email protected]> wrote:
> Ok i'll only commit it on trunk and 5.3 for right now and keep the
> patch ready to apply. What about the other one I sent you (60809) ?
>
> On 20 January 2012 02:10, Stas Malyshev <[email protected]> wrote:
>> Hi!
>>
>>
>>> I did run the test of bug #55871 and got memory leaks. This patch
>>> remove them. Could you please review the patch and if it is Ok i'll
>>> commit it to 5.4
>>
>>
>> Please hold it for now. It's not a critical issue, if we'd have another RC
>> for different reason, we can also have it in as it doesn't look to
>> dangerous.
>> --
>> Stanislav Malyshev, Software Architect
>> SugarCRM: http://www.sugarcrm.com/
>> (408)454-6900 ext. 227

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Stas Malyshev
Re: [PHP-DEV] Remove memory leak in PHP5.4 for bug 55971
January 20, 2012 07:11PM
Hi!

> Nevery mind. Apparently Dmitry committed a patch for this one.

I think what he committed was a patch for another problem - double free
in traits.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Pierrick Charron
Re: [PHP-DEV] Remove memory leak in PHP5.4 for bug 55971
January 20, 2012 07:32PM
Yes :) I sent you an other mail about this bug yesterday to confirm
that I can commit it.

P.

On 20 January 2012 13:05, Stas Malyshev <[email protected]> wrote:
> Hi!
>
>
>> Nevery mind. Apparently Dmitry committed a patch for this one.
>
>
> I think what he committed was a patch for another problem - double free in
> traits.
>
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Sorry, only registered users may post in this forum.

Click here to login