Skip to content

Commit dd63c5e

Browse files
committed
rt: Add an assert to rust_get_current_task
1 parent fa88d15 commit dd63c5e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: src/rt/rust_task.h

+1
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ inline rust_task* rust_get_current_task() {
463463

464464
// Make sure we've calculated the right address
465465
::check_stack_canary(stk);
466+
assert(stk->task != NULL && "task pointer not in stack structure");
466467
return stk->task;
467468
}
468469

0 commit comments

Comments
 (0)