From d1cf8000a37cf09dad346088f03cbc1081a5d39d Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 10 Dec 2019 17:02:46 +0100 Subject: [PATCH] Make double fault handlers diverging Required by x86_64 0.8.0. --- src/interrupts.rs | 2 +- tests/stack_overflow.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interrupts.rs b/src/interrupts.rs index b3f432c7..e9bb9236 100644 --- a/src/interrupts.rs +++ b/src/interrupts.rs @@ -26,7 +26,7 @@ extern "x86-interrupt" fn breakpoint_handler(stack_frame: &mut InterruptStackFra extern "x86-interrupt" fn double_fault_handler( stack_frame: &mut InterruptStackFrame, _error_code: u64, -) { +) -> ! { panic!("EXCEPTION: DOUBLE FAULT\n{:#?}", stack_frame); } diff --git a/tests/stack_overflow.rs b/tests/stack_overflow.rs index 269c3da3..0b5a654d 100644 --- a/tests/stack_overflow.rs +++ b/tests/stack_overflow.rs @@ -45,7 +45,7 @@ pub fn init_test_idt() { extern "x86-interrupt" fn test_double_fault_handler( _stack_frame: &mut InterruptStackFrame, _error_code: u64, -) { +) -> ! { serial_println!("[ok]"); exit_qemu(QemuExitCode::Success); loop {}