Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixed Bug #61785 (Memory leak when access a non-exists file without route) #64

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

reeze commented Apr 20, 2012

@https://bugs.php.net/bug.php?id=61785

When access a non exists file in builtin web server. with --enable-debug it report
leaks.

When send error page, It call php_output_deactivate() it disabled the sent_headers
callback but it will emalloc default_content-type. then it leaks.

So I think set SG(sapi_headers).send_default_content_type to 0 temporary can avoid
leaking.

BTW: I fixed a typo in test file.

Xinchen @laruence will you take a look at this fix?

Thanks.

Owner

laruence commented Apr 20, 2012

hmm, seems I replied to wrong pull request, heh, I meant this one is a good catch, I will look into this in the weekend, thanks

Owner

laruence commented Apr 20, 2012

thanks for spotting this out, but sorry to say, I have committed a better fix.

Comment on behalf of laruence at php.net:

closed

@php-pulls php-pulls closed this Apr 20, 2012

thanks, commit in php/php-src@da85337

Owner

reeze replied Apr 21, 2012

Contributor

reeze commented Apr 21, 2012

Seems you remove capturing... why now?

On 21 April 2012 00:05, Xinchen Hui <
reply@reply.github.com

wrote:

thanks for spotting this out, but sorry to say, I have committed a better
fix.


Reply to this email directly or view it on GitHub:
#64 (comment)

http://reeze.cn

Owner

laruence commented Apr 21, 2012

because the new solution is not heavy anymore than ob_buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment