Hi,
When running 'make test' on my system I discovered that
tests/output/ob_start_basic_unerasable_003.phpt and
tests/output/ob_start_basic_unerasable_004.phpt produced memory leaks -
due to the fact that they first fetch the buffer into return_value but
then do RETURN_FALSE if they detect an error and thus leak the copied
buffer.
I attached a patch that fixes that to this mail.
Any objections to me applying this for 5.3 and HEAD? (after 5.3 RC1 when
commits are allowed again of course) Any side-effects I didn't think about?
Regards,
Christian
Hi,
Did this get addressed yet?
regards,
Lukas
Hi,
When running 'make test' on my system I discovered that
tests/output/ob_start_basic_unerasable_003.phpt and
tests/output/ob_start_basic_unerasable_004.phpt produced memory
leaks -
due to the fact that they first fetch the buffer into return_value but
then do RETURN_FALSE if they detect an error and thus leak the copied
buffer.I attached a patch that fixes that to this mail.
Any objections to me applying this for 5.3 and HEAD? (after 5.3 RC1
when
commits are allowed again of course) Any side-effects I didn't think
about?Regards,
Christian
Index: main/output.cRCS file: /repository/php-src/main/output.c,v
retrieving revision 1.167.2.3.2.4.2.12
diff -u -p -r1.167.2.3.2.4.2.12 output.c
--- main/output.c 13 Feb 2009 11:48:17 -0000 1.167.2.3.2.4.2.12
+++ main/output.c 18 Mar 2009 02:09:13 -0000
@@ -867,10 +867,12 @@ PHP_FUNCTION(ob_get_flush)
/* error checks */
if (!OG(ob_nesting_level)) {
php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to
delete and flush buffer. No buffer to delete or flush.");
}zval_dtor(return_value); RETURN_FALSE;
if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && !
OG(active_ob_buffer).erase) {
php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to
delete buffer %s.", OG(active_ob_buffer).handler_name); }zval_dtor(return_value); RETURN_FALSE;
/* flush /
@@ -892,10 +894,12 @@ PHP_FUNCTION(ob_get_clean)
/ error checks */
if (!OG(ob_nesting_level)) {
php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to
delete buffer. No buffer to delete."); }zval_dtor(return_value); RETURN_FALSE;
if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && !
OG(active_ob_buffer).erase) {
php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to
delete buffer %s.", OG(active_ob_buffer).handler_name); }zval_dtor(return_value); RETURN_FALSE;
/* delete buffer */
--
Lukas Kahwe Smith
mls@pooteeweet.org
Hi Lukas,
Did this get addressed yet?
No, it didn't. But since no one complained about it I'll commit it later
this evening. (commit freeze is over, right?)
Regards,
Christian
Hi Christian
2009/3/25 Christian Seiler chris_se@gmx.net:
Hi Lukas,
Did this get addressed yet?
No, it didn't. But since no one complained about it I'll commit it later
this evening. (commit freeze is over, right?)
Yes commit freeze is over, RC1 was tagged in CVS the other day and
released yesterday.
Regards,
Christian
--
Kalle Sommer Nielsen
kalle@php.net