diff options
author | Kevin B Kenny <kennykb@acm.org> | 2005-08-10 16:28:02 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2005-08-10 16:28:02 (GMT) |
commit | 3d07a4f66acb32cc71599c3192ae22c380c6520f (patch) | |
tree | ce5b8f25cb00c8c29937e43b0557eb4cbf34b730 | |
parent | 5d99536c02360e7f2aa049ce61ed612895eacbdd (diff) | |
download | tcl-3d07a4f66acb32cc71599c3192ae22c380c6520f.zip tcl-3d07a4f66acb32cc71599c3192ae22c380c6520f.tar.gz tcl-3d07a4f66acb32cc71599c3192ae22c380c6520f.tar.bz2 |
further untangling of Tcl_Finalize, and test cleanup on Win32 threaded
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | generic/tclEvent.c | 38 | ||||
-rw-r--r-- | tests/compExpr-old.test | 5 | ||||
-rw-r--r-- | tests/expr.test | 5 |
4 files changed, 38 insertions, 23 deletions
@@ -1,3 +1,16 @@ +2005-08-10 Kevin Kenny <kennykb@acm.org> + + * generic/tclEvent.c (Tcl_Finalize): Pushed Tcl_FinalizeLoad and + Tcl_ResetFilesystem down after Tcl_FinalizeThreadAlloc because + we can't unload DLL's until after their TSD keys are finalized. + (Note that we'll still see aborts if an unloaded DLL has TSD - + that still needs to be fixed. + + * tests/compExpr-old.test (compExpr-3.8): Made tests conditional on + * tests/expr.test (expr-3.8): 'unix' because they get + stack overflows on Win32 + threaded builds, + 2005-08-09 Vince Darley <vincentdarley@users.sourceforge.net> * generic/tclPathObj.c: fix to [file rootname] bug in optimized diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 66c8f85..713ef30 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEvent.c,v 1.61 2005/08/03 22:25:11 dgp Exp $ + * RCS: @(#) $Id: tclEvent.c,v 1.62 2005/08/10 16:28:02 kennykb Exp $ */ #include "tclInt.h" @@ -922,24 +922,6 @@ Tcl_Finalize() TclFinalizeThreadData(); /* - * We defer unloading of packages until very late to avoid memory - * access issues. Both exit callbacks and synchronization variables - * may be stored in packages. - * - * Note that TclFinalizeLoad unloads packages in the reverse of the - * order they were loaded in (i.e. last to be loaded is the first to - * be unloaded). This can be important for correct unloading when - * dependencies exist. - * - * Once load has been finalized, we will have deleted any temporary - * copies of shared libraries and can therefore reset the filesystem - * to its original state. - */ - - TclFinalizeLoad(); - TclResetFilesystem(); - - /* * Now we can free constants for conversions to/from double. */ @@ -972,6 +954,24 @@ Tcl_Finalize() #endif /* + * We defer unloading of packages until very late to avoid memory + * access issues. Both exit callbacks and synchronization variables + * may be stored in packages. + * + * Note that TclFinalizeLoad unloads packages in the reverse of the + * order they were loaded in (i.e. last to be loaded is the first to + * be unloaded). This can be important for correct unloading when + * dependencies exist. + * + * Once load has been finalized, we will have deleted any temporary + * copies of shared libraries and can therefore reset the filesystem + * to its original state. + */ + + TclFinalizeLoad(); + TclResetFilesystem(); + + /* * At this point, there should no longer be any ckalloc'ed memory. */ diff --git a/tests/compExpr-old.test b/tests/compExpr-old.test index f13e0e9..db8601d 100644 --- a/tests/compExpr-old.test +++ b/tests/compExpr-old.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: compExpr-old.test,v 1.13 2005/07/28 18:42:28 dgp Exp $ +# RCS: @(#) $Id: compExpr-old.test,v 1.14 2005/08/10 16:28:02 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -221,7 +221,8 @@ test compExpr-old-3.6 {CompileCondExpr: error compiling false arm} { test compExpr-old-3.7 {CompileCondExpr: long arms & nested cond exprs} { hello_world } {Hello world} -test compExpr-old-3.8 {CompileCondExpr: long arms & nested cond exprs} { +test compExpr-old-3.8 {CompileCondExpr: long arms & nested cond exprs} unix { + # Fails with a stack overflow on threaded Windows builds do_twelve_days } 2358 diff --git a/tests/expr.test b/tests/expr.test index 89ac635..a688331 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: expr.test,v 1.38 2005/08/05 18:50:30 kennykb Exp $ +# RCS: @(#) $Id: expr.test,v 1.39 2005/08/10 16:28:02 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -228,7 +228,8 @@ test expr-3.6 {CompileCondExpr: error compiling false arm} { test expr-3.7 {CompileCondExpr: long arms & nested cond exprs} { hello_world } {Hello world} -test expr-3.8 {CompileCondExpr: long arms & nested cond exprs} { +test expr-3.8 {CompileCondExpr: long arms & nested cond exprs} unix { + # Fails with a stack overflow on threaded Windows builds do_twelve_days } 2358 |