Add an assert in intr handler

This commit is contained in:
Henrik Rydgård committed 2024-10-25 21:36:05 +02:00
1 parent b23fe6ff45
commit c8f7f84627
1 file changed
+5 -1
+5 -1
View File
@@ -413,7 +413,11 @@ void __KernelReturnFromInterrupt()
PendingInterrupt pend = pendingInterrupts.front();
pendingInterrupts.pop_front();
intrHandlers[pend.intr]->handleResult(pend);
if (pend.intr >= 0 && pend.intr < ARRAY_SIZE(intrHandlers)) {
intrHandlers[pend.intr]->handleResult(pend);
} else {
_assert_msg_(false, "Bad pend.intr: %d", pend.intr);
}
inInterrupt = false;
// Restore context after running the interrupt.