Fossil SCM
Disable use of the unloadTcl function on 64-bit Windows, since the underlying MinGW issue does not manifest there.
Commit
ba779faf482242aa3cab750802bed557f0ed7956
Parent
1a30da30db0b238…
1 file changed
+3
-2
+3
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -346,20 +346,21 @@ | ||
| 346 | 346 | /* |
| 347 | 347 | ** atexit() handler which frees up "some" of the resources |
| 348 | 348 | ** used by fossil. |
| 349 | 349 | */ |
| 350 | 350 | static void fossil_atexit(void) { |
| 351 | -#if defined(_WIN32) && defined(FOSSIL_ENABLE_TCL) && defined(USE_TCL_STUBS) | |
| 351 | +#if defined(_WIN32) && !defined(_WIN64) && defined(FOSSIL_ENABLE_TCL) && \ | |
| 352 | + defined(USE_TCL_STUBS) | |
| 352 | 353 | /* |
| 353 | 354 | ** If Tcl is compiled on Windows using the latest MinGW, Fossil can crash |
| 354 | 355 | ** when exiting while a stubs-enabled Tcl is still loaded. This is due to |
| 355 | 356 | ** a bug in MinGW, see: |
| 356 | 357 | ** |
| 357 | 358 | ** http://comments.gmane.org/gmane.comp.gnu.mingw.user/41724 |
| 358 | 359 | ** |
| 359 | 360 | ** The workaround is to manually unload the loaded Tcl library prior to |
| 360 | - ** exiting the process. | |
| 361 | + ** exiting the process. This issue does not impact 64-bit Windows. | |
| 361 | 362 | */ |
| 362 | 363 | unloadTcl(g.interp, &g.tcl); |
| 363 | 364 | #endif |
| 364 | 365 | #ifdef FOSSIL_ENABLE_JSON |
| 365 | 366 | cson_value_free(g.json.gc.v); |
| 366 | 367 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -346,20 +346,21 @@ | |
| 346 | /* |
| 347 | ** atexit() handler which frees up "some" of the resources |
| 348 | ** used by fossil. |
| 349 | */ |
| 350 | static void fossil_atexit(void) { |
| 351 | #if defined(_WIN32) && defined(FOSSIL_ENABLE_TCL) && defined(USE_TCL_STUBS) |
| 352 | /* |
| 353 | ** If Tcl is compiled on Windows using the latest MinGW, Fossil can crash |
| 354 | ** when exiting while a stubs-enabled Tcl is still loaded. This is due to |
| 355 | ** a bug in MinGW, see: |
| 356 | ** |
| 357 | ** http://comments.gmane.org/gmane.comp.gnu.mingw.user/41724 |
| 358 | ** |
| 359 | ** The workaround is to manually unload the loaded Tcl library prior to |
| 360 | ** exiting the process. |
| 361 | */ |
| 362 | unloadTcl(g.interp, &g.tcl); |
| 363 | #endif |
| 364 | #ifdef FOSSIL_ENABLE_JSON |
| 365 | cson_value_free(g.json.gc.v); |
| 366 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -346,20 +346,21 @@ | |
| 346 | /* |
| 347 | ** atexit() handler which frees up "some" of the resources |
| 348 | ** used by fossil. |
| 349 | */ |
| 350 | static void fossil_atexit(void) { |
| 351 | #if defined(_WIN32) && !defined(_WIN64) && defined(FOSSIL_ENABLE_TCL) && \ |
| 352 | defined(USE_TCL_STUBS) |
| 353 | /* |
| 354 | ** If Tcl is compiled on Windows using the latest MinGW, Fossil can crash |
| 355 | ** when exiting while a stubs-enabled Tcl is still loaded. This is due to |
| 356 | ** a bug in MinGW, see: |
| 357 | ** |
| 358 | ** http://comments.gmane.org/gmane.comp.gnu.mingw.user/41724 |
| 359 | ** |
| 360 | ** The workaround is to manually unload the loaded Tcl library prior to |
| 361 | ** exiting the process. This issue does not impact 64-bit Windows. |
| 362 | */ |
| 363 | unloadTcl(g.interp, &g.tcl); |
| 364 | #endif |
| 365 | #ifdef FOSSIL_ENABLE_JSON |
| 366 | cson_value_free(g.json.gc.v); |
| 367 |