aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index e711688..fb68168 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,6 +1,5 @@
#![allow(dead_code)]
#![allow(unused_imports)]
-#![allow(unexpected_cfgs)]
#![no_std]
#![no_main]
#![feature(const_option)]
@@ -66,3 +65,11 @@ pub extern "C" fn _entry() -> ! {
}
}
}
+
+pub unsafe fn _test_pf() {
+ // try a page fault
+ use core::arch::asm;
+ use core::slice;
+ let name_buf = slice::from_raw_parts_mut(0xffffffffffff0000 as *mut u64, 10);
+ asm!("mov [rdi], rax", in("rdi") name_buf.as_mut_ptr());
+}