about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-02-03 17:31:00 -0800
committerBrian Anderson <banderson@mozilla.com>2012-02-03 23:48:12 -0800
commitc7777f4fd97b053ca707b05fae0b4b793b189d3b (patch)
tree8e9114b26416093a8f685717c34aa52929e2db5d /src/rt/rust_task.cpp
parent12fa90888e56c81088e30edd26d1bc404b3e334d (diff)
downloadrust-c7777f4fd97b053ca707b05fae0b4b793b189d3b.tar.gz
rust-c7777f4fd97b053ca707b05fae0b4b793b189d3b.zip
rt: Add sanity checks when we hit the max task/port id
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 1563fe63516..136b00e1f56 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -628,6 +628,7 @@ rust_port_id rust_task::register_port(rust_port *port) {
     scoped_lock with(lock);
 
     rust_port_id id = next_port_id++;
+    A(thread, id != INTPTR_MAX, "Hit the maximum port id");
     port_table.put(id, port);
     return id;
 }