From 786017c5b6251cac760d48aa25dcf03b835e2b8b Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 23 Jul 2022 16:23:26 +0200 Subject: [PATCH] [NTOS] Don't assert, when dispatching an exception to user mode fails Instead continue with second chance handling. --- ntoskrnl/ke/amd64/except.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/ke/amd64/except.c b/ntoskrnl/ke/amd64/except.c index c9c97c9dd2f..de8e2b01697 100644 --- a/ntoskrnl/ke/amd64/except.c +++ b/ntoskrnl/ke/amd64/except.c @@ -361,9 +361,10 @@ KiDispatchException(IN PEXCEPTION_RECORD ExceptionRecord, /* Forward exception to user mode debugger */ if (DbgkForwardException(ExceptionRecord, TRUE, FALSE)) return; - /* Forward exception to user mode (does not return) */ + /* Forward exception to user mode (does not return, if successful) */ KiDispatchExceptionToUser(TrapFrame, &Context, ExceptionRecord); - NT_ASSERT(FALSE); + + /* Failed to dispatch, fall through for second chance handling */ } /* Try second chance */