From 67252450b1e22073a1a7d29e43bab793c23778db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Tue, 23 Apr 2024 19:05:33 +0200 Subject: [PATCH] fix(aarch64): add size of `_private` to `TaskTLS` allocation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- src/arch/aarch64/kernel/scheduler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/aarch64/kernel/scheduler.rs b/src/arch/aarch64/kernel/scheduler.rs index eb850c1800..962c0fd6b8 100644 --- a/src/arch/aarch64/kernel/scheduler.rs +++ b/src/arch/aarch64/kernel/scheduler.rs @@ -278,7 +278,7 @@ impl TaskTLS { let off = core::cmp::max(16, usize::try_from(tls_info.align).unwrap()) - 16; let block_len = usize::try_from(tls_info.memsz).unwrap() + off; - let len = block_len + mem::size_of::>(); + let len = mem::size_of::>() + mem::size_of::() + block_len; let layout = Layout::from_size_align(len, 16).unwrap(); let mut this = unsafe {