php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54535 WSA cleanup executes before MSHUTDOWN
Submitted: 2011-04-15 02:00 UTC Modified: 2016-08-06 02:07 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: dylan dot arnold at gmail dot com Assigned: kalle (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.3SVN-2011-04-14 (snap) OS: Windows
Private report: No CVE-ID: None
 [2011-04-15 02:00 UTC] dylan dot arnold at gmail dot com
Description:
------------
I have a custom PHP extension and when debugging in windows I found that winsock 
is shutdown by PHP before my extensions MSHUTDOWN is run.

This is a problem because I do my own graceful shutdown of a stream in 
MSHUTDOWN.

Inside main/main.c in php_module_shutdown

WSACleanup() executes before zend_shutdown(TSRMLS_C)

The cleanup really needs to be done after zend_shutdown.

This is not a major considering I primarily develop in linux but surely this 
could be a problem for others.

Thanks


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-29 23:50 UTC] cmb@php.net
-Package: Unknown/Other Function +Package: Scripting Engine problem
 [2016-08-06 02:07 UTC] kalle@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: kalle
 [2016-08-06 02:07 UTC] kalle@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Fixed for 7.2
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 11:01:28 2024 UTC