https://git.reactos.org/?p=reactos.git;a=commitdiff;h=054c11a02cf4353d382036...
commit 054c11a02cf4353d38203698a0dbe0c360db72d0 Author: Jason Johnson jasonmjohnson1@gmail.com AuthorDate: Tue Apr 24 18:07:02 2018 -0400 Commit: Ged Murphy gedmurphy@reactos.org CommitDate: Tue Apr 24 23:07:02 2018 +0100
Correctly bugcheck if we aren't returning a usermode thread (#506)
Cause a corresponding bug check to occur for the reason of the user context flag being zero (a system thread), instead of using DbgBreakPoint. --- ntoskrnl/ke/i386/thrdini.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/ke/i386/thrdini.c b/ntoskrnl/ke/i386/thrdini.c index 683ed88f8d..678bedd113 100644 --- a/ntoskrnl/ke/i386/thrdini.c +++ b/ntoskrnl/ke/i386/thrdini.c @@ -78,7 +78,10 @@ KiThreadStartup(VOID) StartFrame->SystemRoutine(StartFrame->StartRoutine, StartFrame->StartContext);
/* If we returned, we better be a user thread */ - if (!StartFrame->UserThread) DbgBreakPoint(); + if (!StartFrame->UserThread) + { + KeBugCheck(NO_USER_MODE_CONTEXT); + }
/* Exit to user-mode */ KiServiceExit2(TrapFrame);