Fossil SCM

Disable use of the unloadTcl function on 64-bit Windows, since the underlying MinGW issue does not manifest there.

mistachkin 2013-09-27 08:52 trunk
Commit ba779faf482242aa3cab750802bed557f0ed7956
1 file changed +3 -2
+3 -2
--- src/main.c
+++ src/main.c
@@ -346,20 +346,21 @@
346346
/*
347347
** atexit() handler which frees up "some" of the resources
348348
** used by fossil.
349349
*/
350350
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)
352353
/*
353354
** If Tcl is compiled on Windows using the latest MinGW, Fossil can crash
354355
** when exiting while a stubs-enabled Tcl is still loaded. This is due to
355356
** a bug in MinGW, see:
356357
**
357358
** http://comments.gmane.org/gmane.comp.gnu.mingw.user/41724
358359
**
359360
** 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.
361362
*/
362363
unloadTcl(g.interp, &g.tcl);
363364
#endif
364365
#ifdef FOSSIL_ENABLE_JSON
365366
cson_value_free(g.json.gc.v);
366367
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button