diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-02-03 17:31:00 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-02-03 23:48:12 -0800 |
| commit | c7777f4fd97b053ca707b05fae0b4b793b189d3b (patch) | |
| tree | 8e9114b26416093a8f685717c34aa52929e2db5d /src/rt/rust_kernel.cpp | |
| parent | 12fa90888e56c81088e30edd26d1bc404b3e334d (diff) | |
| download | rust-c7777f4fd97b053ca707b05fae0b4b793b189d3b.tar.gz rust-c7777f4fd97b053ca707b05fae0b4b793b189d3b.zip | |
rt: Add sanity checks when we hit the max task/port id
Diffstat (limited to 'src/rt/rust_kernel.cpp')
| -rw-r--r-- | src/rt/rust_kernel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rt/rust_kernel.cpp b/src/rt/rust_kernel.cpp index 46bed7237c1..367b76a9136 100644 --- a/src/rt/rust_kernel.cpp +++ b/src/rt/rust_kernel.cpp @@ -89,6 +89,7 @@ rust_kernel::register_task(rust_task *task) { task->user.id = max_task_id++; task_table.put(task->user.id, task); } + K(srv, task->user.id != INTPTR_MAX, "Hit the maximum task id"); KLOG_("Registered task %" PRIdPTR, task->user.id); int new_live_tasks = sync::increment(live_tasks); KLOG_("Total outstanding tasks: %d", new_live_tasks); |
