Skip to content

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

New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

reeze
Copy link
Contributor

@reeze 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.

@laruence
Copy link
Member

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

@laruence
Copy link
Member

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

@php-pulls
Copy link

Comment on behalf of laruence at php.net:

closed

@php-pulls php-pulls closed this Apr 20, 2012
@reeze
Copy link
Contributor Author

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

@laruence
Copy link
Member

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants