diff --git a/Kernel/Syscalls/get_stack_bounds.cpp b/Kernel/Syscalls/get_stack_bounds.cpp index 90f1561376..0f764c736a 100644 --- a/Kernel/Syscalls/get_stack_bounds.cpp +++ b/Kernel/Syscalls/get_stack_bounds.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include @@ -34,8 +35,7 @@ int Process::sys$get_stack_bounds(FlatPtr* user_stack_base, size_t* user_stack_s FlatPtr stack_pointer = Thread::current()->get_register_dump_from_stack().userspace_esp; auto* stack_region = space().find_region_containing(Range { VirtualAddress(stack_pointer), 1 }); if (!stack_region) { - ASSERT_NOT_REACHED(); - return -EINVAL; + PANIC("sys$get_stack_bounds: No stack region found for process"); } FlatPtr stack_base = stack_region->range().base().get();