diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2014-06-23 08:42:36 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2014-06-23 08:42:36 (GMT) |
commit | 33356d7984d054b9c6888c451f8d331e35ed292b (patch) | |
tree | af284d1eef224c641b9d0b8676614bbfc32fac2b /generic/tclIORChan.c | |
parent | aba59c2bf7de72267f36362e81a8be60872a5b9f (diff) | |
parent | 800d3e4d102540eeeaa223f428f007ea81f1015c (diff) | |
download | tcl-33356d7984d054b9c6888c451f8d331e35ed292b.zip tcl-33356d7984d054b9c6888c451f8d331e35ed292b.tar.gz tcl-33356d7984d054b9c6888c451f8d331e35ed292b.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclIORChan.c')
-rw-r--r-- | generic/tclIORChan.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 6a43441..ff602c6 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -2527,6 +2527,11 @@ DeleteReflectedChannelMap( /* * The receiver for the event exited, before processing the event. We * detach the result now, wake the originator up and signal failure. + * + * Attention: Results may have been detached already, by either the + * receiver, or this thread, as part of other parts in the thread + * teardown. Such results are ignored. See ticket [b47b176adf] for the + * identical race condition in Tcl 8.6 IORTrans. */ evPtr = resultPtr->evPtr; @@ -2536,6 +2541,9 @@ DeleteReflectedChannelMap( continue; } paramPtr = evPtr->param; + if (!evPtr) { + continue; + } evPtr->resultPtr = NULL; resultPtr->evPtr = NULL; @@ -2666,6 +2674,11 @@ DeleteThreadReflectedChannelMap( /* * The receiver for the event exited, before processing the event. We * detach the result now, wake the originator up and signal failure. + * + * Attention: Results may have been detached already, by either the + * receiver, or this thread, as part of other parts in the thread + * teardown. Such results are ignored. See ticket [b47b176adf] for the + * identical race condition in Tcl 8.6 IORTrans. */ evPtr = resultPtr->evPtr; @@ -2675,6 +2688,9 @@ DeleteThreadReflectedChannelMap( continue; } paramPtr = evPtr->param; + if (!evPtr) { + continue; + } evPtr->resultPtr = NULL; resultPtr->evPtr = NULL; |