You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-cvs@tcl.apache.org by ro...@apache.org on 2008/03/06 18:16:23 UTC
svn commit: r634353 - in /tcl/websh/trunk/src/generic: varchannel.c webutl.c
Author: ronnie
Date: Thu Mar 6 09:16:22 2008
New Revision: 634353
URL: http://svn.apache.org/viewvc?rev=634353&view=rev
Log:
- fixed Tcl_Obj life-cycle problem in varchannel (Tcl8.5.1 crashed w/o proper Tcl_IncrRefCount)
Modified:
tcl/websh/trunk/src/generic/varchannel.c
tcl/websh/trunk/src/generic/webutl.c
Modified: tcl/websh/trunk/src/generic/varchannel.c
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/generic/varchannel.c?rev=634353&r1=634352&r2=634353&view=diff
==============================================================================
--- tcl/websh/trunk/src/generic/varchannel.c (original)
+++ tcl/websh/trunk/src/generic/varchannel.c Thu Mar 6 09:16:22 2008
@@ -322,6 +322,7 @@
* create name
* ----------------------------------------------------------------------- */
varNameObj = Tcl_NewStringObj(&name[1], -1);
+ Tcl_IncrRefCount(varNameObj);
varChannel->varName = varNameObj;
varChannel->interp = interp;
@@ -341,8 +342,6 @@
/* printf("DBG Web_GetVarChannel - gonna register '%s'\n",name); fflush(stdout); */
Tcl_RegisterChannel(interp, channel);
-
- /* Tcl_DecrRefCount(varNameObj); */
return channel;
}
Modified: tcl/websh/trunk/src/generic/webutl.c
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/generic/webutl.c?rev=634353&r1=634352&r2=634353&view=diff
==============================================================================
--- tcl/websh/trunk/src/generic/webutl.c (original)
+++ tcl/websh/trunk/src/generic/webutl.c Thu Mar 6 09:16:22 2008
@@ -323,6 +323,7 @@
Tcl_NewObj(),
TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG);
*isNew = 1;
+ Tcl_IncrRefCount(var);
}
return var;
---------------------------------------------------------------------
To unsubscribe, e-mail: websh-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-cvs-help@tcl.apache.org