Skip to content

Update TSRM/tsrm_win32.c - #226

Closed
krazyest wants to merge 1 commit into
php:masterfrom
krazyest:patch-1
Closed

krazyest wants to merge 1 commit into
php:masterfrom
krazyest:patch-1

Conversation

@krazyest

@krazyest krazyest commented Nov 2, 2012

Copy link
Copy Markdown

This update fixes the handle leak described here - https://bugs.php.net/bug.php?id=62444

We have to initialize the local thread_token variable to prevent closing some 'random' handle. And at the end of the function we have to use CloseHandle to free the resources we might have obtained, to prevent the leak.

This update fixes the handle leak described here - https://bugs.php.net/bug.php?id=62444

We have to initialize the local thread_token variable to prevent closing some 'random' handle. And at the end of the function we have to use CloseHandle to free the resources we might have obtained, to prevent the leak.
@laruence

laruence commented Nov 2, 2012

Copy link
Copy Markdown
Member

it will be better if you also attach this patch to the bug entry ;) thanks

@krazyest

krazyest commented Nov 2, 2012

Copy link
Copy Markdown
Author

Not sure what is funny, this problem causes headaches to many users. Also not sure about the patch file format, so ... could you check please?

@laruence

laruence commented Nov 2, 2012

Copy link
Copy Markdown
Member

git diff > bug62444.patch

then attach that patch, done :)

@reeze

reeze commented Nov 2, 2012

Copy link
Copy Markdown
Contributor

try download this:

https://github.com/php/php-src/pull/226.patch

or in your branch:

$ git format-patch  -1   // last commit

you will get a patch file

Comment thread TSRM/tsrm_win32.c

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, according to the CS, there should a space after if

@laruence

laruence commented Nov 2, 2012

Copy link
Copy Markdown
Member

oh, I saw you have commented about the fix in that bug entry, sounds okey to me. ingore the patch attaching thing.

thanks

@krazyest

krazyest commented Nov 2, 2012

Copy link
Copy Markdown
Author

Guys, I am doing this for the first time. I do not have GIT, I am not familiar with how PHP bugs are being solved, nor with its code style.

The code I have submitted was created in style of the code I have made the change into. If someone created the original code in wrong style then I am sorry but I can not really do anything about it.

I just have a server here that is freaking out because of this problem. Everyday 10000 handles leak and we do not even have some real traffic.

I have submitted the patch using the common DIFF, not GIT DIFF. If this is wrong, PLEASE could someone create the actual PATCH file that is what is needed.

Thank you1

@laruence

laruence commented Nov 2, 2012

Copy link
Copy Markdown
Member

karzyest, sorry for that. it's okey now. thanks for your work. ;)

@krazyest

krazyest commented Nov 2, 2012

Copy link
Copy Markdown
Author

Thank you for your help. I am looking forward to a new version of PHP to have this fixed.

@php-pulls

Copy link
Copy Markdown

Comment on behalf of laruence at php.net:

patch merged. thanks

@php-pulls php-pulls closed this Nov 2, 2012
@laruence

laruence commented Nov 2, 2012

Copy link
Copy Markdown
Member

fixed at : 3fe3029

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.

4 participants