aboutsummaryrefslogtreecommitdiff
path: root/src/rt/rust_upcall.cpp
diff options
context:
space:
mode:
authorMichael Bebenita <[email protected]>2010-08-11 16:08:26 -0700
committerMichael Bebenita <[email protected]>2010-08-11 16:08:45 -0700
commit74e12fcef682acdbec6c3f4a3fb29b7583e7d1b6 (patch)
tree73abc23ff1587457b10279bc79d879d2e620f0be /src/rt/rust_upcall.cpp
parentAdded a -v(algrind) option to run.py. (diff)
downloadrust-74e12fcef682acdbec6c3f4a3fb29b7583e7d1b6.tar.xz
rust-74e12fcef682acdbec6c3f4a3fb29b7583e7d1b6.zip
Ignore upcall_flush for channels that are disassociated from ports. This makes task-comm-10 break a little less hard, but it still leaks because messages pending in the channel are never freed.
Diffstat (limited to 'src/rt/rust_upcall.cpp')
-rw-r--r--src/rt/rust_upcall.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp
index 90d6f6d9..01eaf744 100644
--- a/src/rt/rust_upcall.cpp
+++ b/src/rt/rust_upcall.cpp
@@ -116,6 +116,14 @@ upcall_flush_chan(rust_task *task, rust_chan *chan) {
return;
}
+ // We cannot flush if the target port was dropped.
+ if (chan->is_associated() == false) {
+ return;
+ }
+
+ A(dom, chan->is_associated(),
+ "Channel should be associated to a port.");
+
A(dom, chan->port->is_proxy() == false,
"Channels to remote ports should be flushed automatically.");