diff --git a/src/arch/x86_64/kernel/scheduler.rs b/src/arch/x86_64/kernel/scheduler.rs index 803e349c03..280276531b 100644 --- a/src/arch/x86_64/kernel/scheduler.rs +++ b/src/arch/x86_64/kernel/scheduler.rs @@ -294,7 +294,7 @@ impl TaskTLS { // thread_ptr = block_ptr + tls_offset let thread_ptr = block[tls_offset..].as_mut_ptr().cast::<()>(); unsafe { - thread_ptr.cast::<*mut ()>().write(thread_ptr); + thread_ptr.cast::<*mut ()>().write_unaligned(thread_ptr); } let this = Self {