Bugfix NULL pointer dereference during pagefault error printing
This commit is contained in:
parent
e8fef8d87c
commit
08071e6858
@ -124,8 +124,12 @@ static void pt_exception_handler(enum exception_type type, int subtype,
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (vaddr_reg == NULL || vaddr_reg->free) {
|
||||
debug_printf("[pt_exception_handler] page_addr = %x, base = %x, size = %x\n", page_addr, vaddr_reg->base, vaddr_reg->size);
|
||||
if (vaddr_reg == NULL) {
|
||||
debug_printf("[pt_exception_handler] page_addr = 0x%x\n", page_addr);
|
||||
USER_PANIC("[pt_exception_handler][ERROR] Page fault ouside valid virtual address space");
|
||||
}
|
||||
if (vaddr_reg->free) {
|
||||
debug_printf("[pt_exception_handler] page_addr = 0x%x, base = 0x%x, size = 0x%x\n", page_addr, vaddr_reg->base, vaddr_reg->size);
|
||||
USER_PANIC("[pt_exception_handler][ERROR] Page fault ouside allocated address space");
|
||||
}
|
||||
if (!vaddr_reg->heap) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user