mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
Fix previous strangely incomplete NtRaiseException implementation and re-enable the ProbeForRead call that failed
svn path=/trunk/; revision=17816
This commit is contained in:
parent
2dfe1a384e
commit
025e6f6975
3 changed files with 10 additions and 1 deletions
|
@ -23,7 +23,7 @@ KiContinuePreviousModeUser(IN PCONTEXT Context,
|
|||
CONTEXT LocalContext;
|
||||
|
||||
/* We'll have to make a copy and probe it */
|
||||
//ProbeForRead(Context, sizeof(CONTEXT), sizeof(ULONG));
|
||||
ProbeForRead(Context, sizeof(CONTEXT), sizeof(ULONG));
|
||||
RtlMoveMemory(&LocalContext, Context, sizeof(CONTEXT));
|
||||
Context = &LocalContext;
|
||||
|
||||
|
|
|
@ -1017,6 +1017,7 @@ KiDispatchException(PEXCEPTION_RECORD ExceptionRecord,
|
|||
/* Align context size and get stack pointer */
|
||||
Size = (sizeof(CONTEXT) + 3) & ~3;
|
||||
Stack = (Context.Esp & ~3) - Size;
|
||||
DPRINT1("Stack: %lx\n", Stack);
|
||||
|
||||
/* Probe stack and copy Context */
|
||||
ProbeForWrite((PVOID)Stack, Size, sizeof(ULONG));
|
||||
|
@ -1027,6 +1028,7 @@ KiDispatchException(PEXCEPTION_RECORD ExceptionRecord,
|
|||
(EXCEPTION_MAXIMUM_PARAMETERS - ExceptionRecord->NumberParameters) *
|
||||
sizeof(ULONG) + 3) & ~3;
|
||||
NewStack = Stack - Size;
|
||||
DPRINT1("NewStack: %lx\n", NewStack);
|
||||
|
||||
/* Probe stack and copy exception record. Don't forget to add the two params */
|
||||
ProbeForWrite((PVOID)(NewStack - 2 * sizeof(ULONG_PTR)),
|
||||
|
|
|
@ -498,6 +498,13 @@ _NtRaiseException@12:
|
|||
pop ebp
|
||||
mov esp, ebp
|
||||
|
||||
/* Check the result */
|
||||
or eax, eax
|
||||
jz _KiServiceExit2
|
||||
|
||||
/* Restore debug registers too */
|
||||
jmp _KiServiceExit
|
||||
|
||||
.globl _NtContinue@8
|
||||
_NtContinue@8:
|
||||
|
||||
|
|
Loading…
Reference in a new issue