Kernel: Scheduler will panic if it encounters stack overflow

This commit is contained in:
Bananymous 2023-04-11 23:29:21 +03:00
parent bdaf7cddcb
commit 69f13f1896
1 changed files with 3 additions and 0 deletions

View File

@ -157,6 +157,9 @@ namespace Kernel
Thread& current = current_thread();
current.set_rip(rip);
current.set_rsp(rsp);
ASSERT(current.stack_base() <= rsp && rsp <= current.stack_base() + current.stack_size());
return false;
}