Fossil

Check-in [da96f916cb]
Login

Check-in [da96f916cb]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Prevent a crash in fossil during exit, when a mingw-compiled (with dw2) Tcl version is still loaded. This is clearly a dw2 bug (see: [http://comments.gmane.org/gmane.comp.gnu.mingw.user/41724]), but the suggested workaround works and is managable.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: da96f916cb02bdb94f9c4b457b377a954b176cd3
User & Date: jan.nijtmans 2013-09-23 10:17:48.928
Context
2013-09-27
14:41
The various "diff --tk" commands now take an optional, undocumented option "--script FILENAME" that causes the Tk script to be written into FILENAME rather than to be run. One use for this is to get a copy of the diff script in a form were it can be easily edited and enhanced before being moved back into Fossil. ... (check-in: 326a736493 user: drh tags: tkdiff-enhancements)
2013-09-25
23:56
Add formal unloading support to the Tcl integration subsystem. This is necessary to prevent a deadlock while exiting the process when Tcl is loaded. Add runtime detection of the ability to directly invoke an objProc for a Tcl command. Support USE_TCL_STUBS define in the version information. ... (check-in: 6b58c67ed8 user: mistachkin tags: trunk)
08:29
FOSSIL_ENABLE_TCL_PRIVATE_STUBS only makes sense when USE_TCL_STUBS is defined as well. Use that consistantly in the code. Easier testing whether Tcl integration works fine, just by "fossil version -v". ... (check-in: 0038f4c999 user: jan.nijtmans tags: pending-review)
2013-09-24
16:11
merged in trunk ... (Closed-Leaf check-in: 4fb3675a1a user: stephan tags: usage-command)
2013-09-23
12:09
Loading Tcl 8.4 only works when USE_TCL_EVALOBJV=1. Reason: the function Tcl_GetCommandFromObj is introduced in Tcl 8.5 (TIP #139). Actually, the source code history for Tcl indicates that this is not correct. Both Tcl_GetCommandFromObj and Tcl_GetCommandInfoFromToken are present for Tcl 8.4. The Tcl_GetCommandInfoFromToken function was added in TIP #32 and the Tcl_GetCommandFromObj function exists since the initial check-in in the Tcl repository, circa 1998. ... (Closed-Leaf check-in: 2234fabe76 user: jan.nijtmans tags: support-tcl84-stubs)
10:17
Prevent a crash in fossil during exit, when a mingw-compiled (with dw2) Tcl version is still loaded. This is clearly a dw2 bug (see: [http://comments.gmane.org/gmane.comp.gnu.mingw.user/41724]), but the suggested workaround works and is managable. ... (check-in: da96f916cb user: jan.nijtmans tags: trunk)
2013-09-19
18:36
Per feedback, further improve the Tcl shared library error message. ... (check-in: aad3ef3288 user: mistachkin tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
342
343
344
345
346
347
348










349
350
351
352
353
354
355
}

/*
** atexit() handler which frees up "some" of the resources
** used by fossil.
*/
static void fossil_atexit(void) {










#ifdef FOSSIL_ENABLE_JSON
  cson_value_free(g.json.gc.v);
  memset(&g.json, 0, sizeof(g.json));
#endif
  free(g.zErrMsg);
  if(g.db){
    db_close(0);







>
>
>
>
>
>
>
>
>
>







342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
}

/*
** atexit() handler which frees up "some" of the resources
** used by fossil.
*/
static void fossil_atexit(void) {
#if defined(_WIN32) && defined(USE_TCL_STUBS)
  /* If Tcl is compiled on win32 using the latest mingw,
   * fossil crashes when exiting while Tcl is still loaded.
   * That's a bug in mingw, see:
   * <http://comments.gmane.org/gmane.comp.gnu.mingw.user/41724>
   * but the workaround is not that bad at all: */
  if( g.tcl.library ){
    FreeLibrary(g.tcl.library);
  }
#endif
#ifdef FOSSIL_ENABLE_JSON
  cson_value_free(g.json.gc.v);
  memset(&g.json, 0, sizeof(g.json));
#endif
  free(g.zErrMsg);
  if(g.db){
    db_close(0);