Trigger a double fault through a stack overflow -> triple fault

This commit is contained in:
Philipp Oppermann
2019-01-25 13:55:42 +01:00
parent 218cb9399e
commit 7fd29c9cbe

View File

@@ -12,10 +12,12 @@ pub extern "C" fn _start() -> ! {
blog_os::interrupts::init_idt(); blog_os::interrupts::init_idt();
// trigger a page fault fn stack_overflow() {
unsafe { stack_overflow(); // for each recursion, the return address is pushed
*(0xdeadbeef as *mut u64) = 42; }
};
// trigger a stack overflow
stack_overflow();
println!("It did not crash!"); println!("It did not crash!");
loop {} loop {}