Trigger a stack overflow (still causes a triple fault)

This commit is contained in:
Philipp Oppermann
2017-01-02 15:36:22 +01:00
parent dfa1cc48c9
commit 47755d541d

View File

@@ -56,8 +56,12 @@ pub extern "C" fn rust_main(multiboot_information_address: usize) {
// initialize our IDT
interrupts::init();
// trigger a debug exception
unsafe { int!(1) };
fn stack_overflow() {
stack_overflow(); // for each recursion, the return address is pushed
}
// trigger a stack overflow
stack_overflow();
println!("It did not crash!");
loop {}