summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-05-01 16:33:39 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-05-01 16:33:39 (GMT)
commit8e5e88f4dbbd30500ce43e26c083e19cd44c217b (patch)
tree4aac92dc41c8a340a4fe4cb06ddf02b7f7b01cfe /generic
parentd3c1978e070d0b1a990192e884cde57de81c43cb (diff)
downloadtcl-8e5e88f4dbbd30500ce43e26c083e19cd44c217b.zip
tcl-8e5e88f4dbbd30500ce43e26c083e19cd44c217b.tar.gz
tcl-8e5e88f4dbbd30500ce43e26c083e19cd44c217b.tar.bz2
Stop the segfault in iogt-2.4. First by changing the UpdateInterest()
call that triggers it. "downChanPtr" may no longer be the right argument at that point. Second, after ending the segfault, the test became an infinite loop (nested unstacking?! whoa.), so revised the test to one that terminates (and passes). Left behind a comment that the recursive unstacking case may require more examination.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIO.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 776ff12..a83cdcd 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -1876,6 +1876,13 @@ Tcl_UnstackChannel(
* into the old structure.
*/
+ /*
+ * TODO: Figure out how to handle the situation where the chan
+ * operations called below by this unstacking operation cause
+ * another unstacking recursively. In that case the downChanPtr
+ * value we're holding on to will not be the right thing.
+ */
+
Channel *downChanPtr = chanPtr->downChanPtr;
/*
@@ -1980,7 +1987,7 @@ Tcl_UnstackChannel(
*/
Tcl_EventuallyFree(chanPtr, TCL_DYNAMIC);
- UpdateInterest(downChanPtr);
+ UpdateInterest(statePtr->topChanPtr);
if (result != 0) {
Tcl_SetErrno(result);