We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0775db commit 7ec29e1Copy full SHA for 7ec29e1
testing/src/gdt.rs
@@ -1,3 +1,4 @@
1
+use core::ptr;
2
use lazy_static::lazy_static;
3
use x86_64::structures::gdt::{Descriptor, GlobalDescriptorTable, SegmentSelector};
4
use x86_64::structures::tss::TaskStateSegment;
@@ -12,7 +13,7 @@ lazy_static! {
12
13
const STACK_SIZE: usize = 4096;
14
static mut STACK: [u8; STACK_SIZE] = [0; STACK_SIZE];
15
- let stack_start = VirtAddr::from_ptr(unsafe { &STACK });
16
+ let stack_start = VirtAddr::from_ptr(unsafe { ptr::addr_of!(STACK) });
17
let stack_end = stack_start + STACK_SIZE as u64;
18
stack_end
19
};
0 commit comments