mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Trigger a stack overflow (still causes a triple fault)
This commit is contained in:
@@ -56,8 +56,12 @@ pub extern "C" fn rust_main(multiboot_information_address: usize) {
|
|||||||
// initialize our IDT
|
// initialize our IDT
|
||||||
interrupts::init();
|
interrupts::init();
|
||||||
|
|
||||||
// trigger a debug exception
|
fn stack_overflow() {
|
||||||
unsafe { int!(1) };
|
stack_overflow(); // for each recursion, the return address is pushed
|
||||||
|
}
|
||||||
|
|
||||||
|
// trigger a stack overflow
|
||||||
|
stack_overflow();
|
||||||
|
|
||||||
println!("It did not crash!");
|
println!("It did not crash!");
|
||||||
loop {}
|
loop {}
|
||||||
|
|||||||
Reference in New Issue
Block a user