From 586281e2d6d7f63e2b2d2b09c7f310f3b1d35355 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Mon, 19 Dec 2011 18:27:43 -0800 Subject: [PATCH] libcore: Remove stack alignment from task spawning This is already done by the native task start code. Closes #1324 --- src/libcore/task.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libcore/task.rs b/src/libcore/task.rs index 5cb2af9679d4..4d527cbe0619 100644 --- a/src/libcore/task.rs +++ b/src/libcore/task.rs @@ -316,8 +316,9 @@ fn unsafe_spawn_inner(-thunk: fn@(), let thunkenv: *mutable uint = cast(sp - ptrsize); *thunkfn = cast(raw_thunk.code);; *thunkenv = cast(raw_thunk.env);; - // align the stack to 16 bytes - (**task_ptr).stack_ptr = cast(sp - ptrsize * 4u); + // Advance the stack pointer. No need to align because + // the native code will do that for us + (**task_ptr).stack_ptr = cast(sp - ptrsize * 2u); // set up notifications if they are enabled. alt notify {