Triple-fault by deliberately dividing by zero with no handler
This commit is contained in:
parent
41dfe6215d
commit
596bb35697
@ -1,4 +1,4 @@
|
|||||||
#![feature(abi_x86_interrupt)]
|
#![feature(abi_x86_interrupt, asm)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
|
|
||||||
@ -24,6 +24,10 @@ pub extern "C" fn _start() -> ! {
|
|||||||
init();
|
init();
|
||||||
x86_64::instructions::interrupts::int3();
|
x86_64::instructions::interrupts::int3();
|
||||||
|
|
||||||
|
unsafe {
|
||||||
|
asm!("mov dx, 0; div dx" ::: "ax", "dx" : "volatile", "intel")
|
||||||
|
}
|
||||||
|
|
||||||
println!("Gamarjoba, munde: {}", 1);
|
println!("Gamarjoba, munde: {}", 1);
|
||||||
println!("Gamarjoba, munde: {}", 2);
|
println!("Gamarjoba, munde: {}", 2);
|
||||||
panic!("A bad thing happened");
|
panic!("A bad thing happened");
|
||||||
|
Loading…
Reference in New Issue
Block a user