1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:07:34 +00:00

Kernel: Mark handle_crash() as [[noreturn]]

This commit is contained in:
Andreas Kling 2021-02-14 11:36:28 +01:00
parent fcda9ee7f5
commit 10b7f6b77e
3 changed files with 1 additions and 6 deletions

View file

@ -263,7 +263,6 @@ void page_fault_handler(TrapFrame* trap)
if (!faulted_in_kernel && !MM.validate_user_stack(current_thread->process(), VirtualAddress(regs.userspace_esp))) {
dbgln("Invalid stack pointer: {}", VirtualAddress(regs.userspace_esp));
handle_crash(regs, "Bad stack on page fault", SIGSTKFLT);
ASSERT_NOT_REACHED();
}
auto response = MM.handle_page_fault(PageFault(regs.exception_code, VirtualAddress(fault_address)));

View file

@ -283,7 +283,7 @@ void replace_shared_handler_with_single(GenericInterruptHandler&);
void unregister_generic_interrupt_handler(u8 number, GenericInterruptHandler&);
void flush_idt();
void load_task_register(u16 selector);
void handle_crash(RegisterState&, const char* description, int signal, bool out_of_memory = false);
[[noreturn]] void handle_crash(RegisterState&, const char* description, int signal, bool out_of_memory = false);
#define LSW(x) ((u32)(x)&0xFFFF)
#define MSW(x) (((u32)(x) >> 16) & 0xFFFF)