https://git.reactos.org/?p=reactos.git;a=commitdiff;h=786017c5b6251cac760d48aa25dcf03b835e2b8b

commit 786017c5b6251cac760d48aa25dcf03b835e2b8b
Author:     Timo Kreuzer <[email protected]>
AuthorDate: Sat Jul 23 16:23:26 2022 +0200
Commit:     Timo Kreuzer <[email protected]>
CommitDate: Thu Aug 4 16:15:24 2022 +0200

    [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 */

Reply via email to