mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
Kernel: Don't use {:p} when printing out invalid userspace stack pointer
`userspace_esp` is a virtual address and thus using `{:p}` on it is invalid and will cause an assertion failure. I ran into this while testing #9772.
This commit is contained in:
parent
2b13c9942d
commit
01af7d1ae1
Notes:
sideshowbarker
2024-07-18 04:50:11 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/01af7d1ae16 Pull-request: https://github.com/SerenityOS/serenity/pull/9771
1 changed files with 1 additions and 1 deletions
|
@ -646,7 +646,7 @@ void MemoryManager::validate_syscall_preconditions(AddressSpace& space, Register
|
|||
{
|
||||
VirtualAddress userspace_sp = VirtualAddress { regs.userspace_sp() };
|
||||
if (!MM.validate_user_stack_no_lock(space, userspace_sp)) {
|
||||
dbgln("Invalid stack pointer: {:p}", userspace_sp);
|
||||
dbgln("Invalid stack pointer: {}", userspace_sp);
|
||||
unlock_and_handle_crash("Bad stack on syscall entry", SIGSTKFLT);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue