mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[NTOS:KE/x64] Fix exception information on page faults
Pass a proper write/execute flag in the ExceptionInformation[0] field of the exception record instead of the raw fault code. This fixes comdlg:filedlg wine test, which writes to a write protected resource section, which needs to be handled by kernel32 UnhandledExceptionFilter, which relies on this parameter to be correct.
This commit is contained in:
parent
5eab2ddb2e
commit
2913ef5c93
1 changed files with 4 additions and 1 deletions
|
@ -461,8 +461,11 @@ IntsDisabled:
|
|||
|
||||
PageFaultError:
|
||||
|
||||
/* Set parameter 1 to error code */
|
||||
/* Set parameter 1 to write/execute flag.
|
||||
See https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-exception_record */
|
||||
mov r9d, [rbp + KTRAP_FRAME_ErrorCode]
|
||||
shr r9d, 1
|
||||
and r9d, 9
|
||||
|
||||
/* Set parameter 2 to faulting address */
|
||||
mov r10, cr2 // Param2 = faulting address
|
||||
|
|
Loading…
Reference in a new issue