mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[NTOS:Ke/x64] Improve KiDispatchExceptionToUser
Return back to the caller instead of exiting through KiServiceExit2, which is broken and needs to be changed to allow restoring of an exception frame.
This commit is contained in:
parent
24b4026ce8
commit
5b82ada2ed
1 changed files with 9 additions and 5 deletions
|
@ -93,7 +93,7 @@ KeInitExceptions(VOID)
|
|||
}
|
||||
|
||||
static
|
||||
VOID
|
||||
BOOLEAN
|
||||
KiDispatchExceptionToUser(
|
||||
IN PKTRAP_FRAME TrapFrame,
|
||||
IN PCONTEXT Context,
|
||||
|
@ -147,7 +147,7 @@ KiDispatchExceptionToUser(
|
|||
|
||||
/* Nothing we can do here */
|
||||
_disable();
|
||||
_SEH2_YIELD(return);
|
||||
return FALSE;
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
|
@ -172,7 +172,7 @@ KiDispatchExceptionToUser(
|
|||
_disable();
|
||||
|
||||
/* Exit to usermode */
|
||||
KiServiceExit2(TrapFrame);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static
|
||||
|
@ -361,8 +361,12 @@ 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, if successful) */
|
||||
KiDispatchExceptionToUser(TrapFrame, &Context, ExceptionRecord);
|
||||
/* Forward exception to user mode */
|
||||
if (KiDispatchExceptionToUser(TrapFrame, &Context, ExceptionRecord))
|
||||
{
|
||||
/* Success, the exception will be handled by KiUserExceptionDispatcher */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Failed to dispatch, fall through for second chance handling */
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue