Re: [PHP-CVS] cvs: php-src /main output.c
FYI: I remember seeing several (!) bug reports about something like this. I noticed you closed at least one, but there might be more.. --Jani Arnaud Le Blanc wrote: lbarnaudMon Aug 18 03:54:50 2008 UTC Modified files: /php-src/main output.c Log: update buffer size after having effectively realloc()ed it when appending data to an output buffer # may caused some problems if erealloc() failed here because of memory # limit ("memory limit exhausted" error message then written to # the buffer, etc) http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.210&r2=1.211&diff_format=u Index: php-src/main/output.c diff -u php-src/main/output.c:1.210 php-src/main/output.c:1.211 --- php-src/main/output.c:1.210 Tue Mar 4 23:39:15 2008 +++ php-src/main/output.c Mon Aug 18 03:54:49 2008 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: output.c,v 1.210 2008/03/04 23:39:15 felipe Exp $ */ +/* $Id: output.c,v 1.211 2008/08/18 03:54:49 lbarnaud Exp $ */ #ifndef PHP_OUTPUT_DEBUG # define PHP_OUTPUT_DEBUG 0 @@ -913,7 +913,8 @@ size_t grow_buf = PHP_OUTPUT_HANDLER_INITBUF_SIZE(buf->used - (handler->buffer.size - handler->buffer.used)); size_t grow_max = MAX(grow_int, grow_buf); - handler->buffer.data = erealloc(handler->buffer.data, handler->buffer.size += grow_max); + handler->buffer.data = erealloc(handler->buffer.data, handler->buffer.size + grow_max); + handler->buffer.size += grow_max; } memcpy(handler->buffer.data + handler->buffer.used, buf->data, buf->used); handler->buffer.used += buf->used; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /main output.c
Hi, Sorry, I should have ran these tests too... I will try to find a better way to fix that. Regards, Arnaud On Monday 18 August 2008 09:45:59 Antony Dovgal wrote: > tony2001 Mon Aug 18 07:45:59 2008 UTC > > Modified files: > /php-src/main output.c > Log: > reverted because it causes lots of test failures in ext/soap > > > http://cvs.php.net/viewvc.cgi/php- src/main/output.c?r1=1.213&r2=1.214&diff_format=u > Index: php-src/main/output.c > diff -u php-src/main/output.c:1.213 php-src/main/output.c:1.214 > --- php-src/main/output.c:1.213 Mon Aug 18 04:11:51 2008 > +++ php-src/main/output.c Mon Aug 18 07:45:59 2008 > @@ -19,7 +19,7 @@ > +--+ > */ > > -/* $Id: output.c,v 1.213 2008/08/18 04:11:51 lbarnaud Exp $ */ > +/* $Id: output.c,v 1.214 2008/08/18 07:45:59 tony2001 Exp $ */ > > #ifndef PHP_OUTPUT_DEBUG > #define PHP_OUTPUT_DEBUG 0 > @@ -1275,11 +1275,7 @@ > > /* pass output along */ > if (context.out.data && context.out.used && !(flags & PHP_OUTPUT_POP_DISCARD)) { > - /* in case of unclean_shutdown, do not output the > buffer if it is not > - * meant to be until end of script or ob_end_*() call */ > - if (!CG(unclean_shutdown) || orphan->size) { > - php_output_write(context.out.data, > context.out.used TSRMLS_CC); > - } > + php_output_write(context.out.data, context.out.used > TSRMLS_CC); > } > > /* destroy the handler (after write!) */ > > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php