|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-04-03 14:00 UTC] charlie at lemurconsulting dot com
Description: ------------ While trying to make the Xapian (www.xapian.org) PHP bindings work on Windows using Visual C++, we found that the CLI version of PHP would crash when unloading the bindings. The bindings are written using SWIG. PHP appears to be trying to unload resources when the crash occurs. The crash does not occur on earlier versions of PHP i.e. 4.4.6 Reproduce code: --------------- The following patch fixes the problem and has been used as a workaround: Patch php_cli.c as follows by commenting out line 1283: #ifdef ZTS /* tsrm_shutdown(); */ #endif Expected result: ---------------- No crash :) Actual result: -------------- n/a PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 05:00:01 2025 UTC |
This seams to me like a problem outside of PHP. The xapian extension create module globals but does not do any cleanup. Looks to me like it can be solved with code like this: PHP_MSHUTDOWN_FUNCTION(printer) { #ifdef ZTS ts_free_id(printer_globals_id); #else php_printer_shutdown(&printer_globals TSRMLS_CC); #endif UNREGISTER_INI_ENTRIES(); return SUCCESS; } I have not tested anything, but just remembering the same type of problem with the printer (and other) exntension in the past.