diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index d2ebac637932..e5c207897609 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -219,7 +219,6 @@ rust_task::rust_task(rust_task_thread *thread, rust_task_list *state, DLOG(thread, task, "sizeof(task) = %d (0x%x)", sizeof *this, sizeof *this); stk = new_stk(thread, this, init_stack_sz); - rust_sp = stk->end; if (supervisor) { supervisor->ref(); } @@ -336,7 +335,7 @@ rust_task::start(spawn_fn spawnee_fn, I(thread, stk->data != NULL); - char *sp = (char *)rust_sp; + char *sp = (char *)stk->end; sp -= sizeof(spawn_args); diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h index 61b6c9826768..397e59a5f541 100644 --- a/src/rt/rust_task.h +++ b/src/rt/rust_task.h @@ -53,8 +53,6 @@ rust_task : public kernel_owned, rust_cond bool notify_enabled; chan_handle notify_chan; - uintptr_t rust_sp; // Saved sp when not running. - context ctx; stk_seg *stk; uintptr_t runtime_sp; // Runtime sp while task running.