Skip to content

Commit

Permalink
Merge pull request #1155 from hermit-os/aarch64-tls
Browse files Browse the repository at this point in the history
fix(aarch64): add size of `_private` to `TaskTLS` allocation
  • Loading branch information
mkroening authored Apr 24, 2024
2 parents 84857e1 + 82a3f85 commit 2347a3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/arch/aarch64/kernel/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Box<[Dtv; 2]>>();
let len = mem::size_of::<Box<[Dtv; 2]>>() + mem::size_of::<usize>() + block_len;

let layout = Layout::from_size_align(len, 16).unwrap();
let mut this = unsafe {
Expand Down

0 comments on commit 2347a3f

Please sign in to comment.