Skip to content

Instantly share code, notes, and snippets.

@cmb69

cmb69/.diff Secret

Last active April 21, 2021 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmb69/3db404b2aad74726892db0459da22560 to your computer and use it in GitHub Desktop.
Save cmb69/3db404b2aad74726892db0459da22560 to your computer and use it in GitHub Desktop.
Xdebug ZTS shutdown crash on Windows
xdebug.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/xdebug.c b/xdebug.c
index e135bb44..0bed189a 100644
--- a/xdebug.c
+++ b/xdebug.c
@@ -566,25 +566,25 @@ PHP_MINIT_FUNCTION(xdebug)
PHP_MSHUTDOWN_FUNCTION(xdebug)
{
- if (XDEBUG_MODE_IS_OFF()) {
- return SUCCESS;
- }
+ if (!XDEBUG_MODE_IS_OFF()) {
- if (XDEBUG_MODE_IS(XDEBUG_MODE_GCSTATS)) {
- xdebug_gcstats_mshutdown();
- }
- if (XDEBUG_MODE_IS(XDEBUG_MODE_PROFILING)) {
- xdebug_profiler_mshutdown();
- }
+ if (XDEBUG_MODE_IS(XDEBUG_MODE_GCSTATS)) {
+ xdebug_gcstats_mshutdown();
+ }
+ if (XDEBUG_MODE_IS(XDEBUG_MODE_PROFILING)) {
+ xdebug_profiler_mshutdown();
+ }
- xdebug_library_mshutdown();
+ xdebug_library_mshutdown();
#ifdef ZTS
- ts_free_id(xdebug_globals_id);
+ ts_free_id(xdebug_globals_id);
#else
- php_xdebug_shutdown_globals(&xdebug_globals);
+ php_xdebug_shutdown_globals(&xdebug_globals);
#endif
+ }
+
return SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment