diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h index 87aeca511e9f..f670704293ae 100644 --- a/src/rt/rust_task.h +++ b/src/rt/rust_task.h @@ -463,6 +463,7 @@ inline rust_task* rust_get_current_task() { // Make sure we've calculated the right address ::check_stack_canary(stk); + assert(stk->task != NULL && "task pointer not in stack structure"); return stk->task; }