diff options
author | redman <redman> | 1999-04-09 23:32:30 (GMT) |
---|---|---|
committer | redman <redman> | 1999-04-09 23:32:30 (GMT) |
commit | f01a23a0d649c1e5f8961b7305adc4d74c614312 (patch) | |
tree | 05e8f03ee789c6f1a3a045a7f7bb027d67b8e33d | |
parent | d9501cc258ad75c8e15f3b507a1522467188e685 (diff) | |
download | tk-f01a23a0d649c1e5f8961b7305adc4d74c614312.zip tk-f01a23a0d649c1e5f8961b7305adc4d74c614312.tar.gz tk-f01a23a0d649c1e5f8961b7305adc4d74c614312.tar.bz2 |
Fix deadlock situtation in generic/tkWindow.c when Initialize() doesn't
core_8_1_branch_old
let go of the window mutex before returning (error situation).
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tkWindow.c | 6 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,9 @@ +1999-04-09 <redman@scriptics.com> + + * generic/tkWindow.c: Fixed deadlock situation when the Initialize() + function returns without releasing the mutex. Found while testing + Bug 1700, during safe.test (tk). + 1999-04-06 <stanton@scriptics.com> * generic/tkMain.c (Tk_MainEx): Changed to reset result before diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 3cc3228..03e19dc 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.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: tkWindow.c,v 1.1.4.12 1999/04/06 18:20:49 redman Exp $ + * RCS: @(#) $Id: tkWindow.c,v 1.1.4.13 1999/04/09 23:32:33 redman Exp $ */ #include "tkPort.h" @@ -2762,6 +2762,7 @@ Initialize(interp) if (master == NULL) { Tcl_DStringFree(&ds); Tcl_AppendResult(interp, "NULL master", (char *) NULL); + Tcl_MutexUnlock(&windowMutex); return TCL_ERROR; } if (!Tcl_IsSafe(master)) { @@ -2775,6 +2776,7 @@ Initialize(interp) if (Tcl_GetInterpPath(master, interp) != TCL_OK) { Tcl_AppendResult(interp, "error in Tcl_GetInterpPath", (char *) NULL); + Tcl_MutexUnlock(&windowMutex); return TCL_ERROR; } /* @@ -2798,6 +2800,7 @@ Initialize(interp) Tcl_AppendResult(interp, "not allowed to start Tk by master's safe::TkInit", (char *) NULL); + Tcl_MutexUnlock(&windowMutex); return TCL_ERROR; } Tcl_DStringFree(&ds); @@ -2825,6 +2828,7 @@ Initialize(interp) argError: Tcl_AddErrorInfo(interp, "\n (processing arguments in argv variable)"); + Tcl_MutexUnlock(&windowMutex); return TCL_ERROR; } if (Tk_ParseArgv(interp, (Tk_Window) NULL, &argc, argv, |