Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
23081203
Commit
23081203
authored
Aug 20, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64: Forward 64-bit invalid handle exceptions to the 32-bit guest.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e30b56b1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
4 deletions
+41
-4
process.c
dlls/wow64/process.c
+21
-0
syscall.c
dlls/wow64/syscall.c
+16
-1
wow64.spec
dlls/wow64/wow64.spec
+1
-1
wow64_private.h
dlls/wow64/wow64_private.h
+3
-2
No files found.
dlls/wow64/process.c
View file @
23081203
...
@@ -1251,3 +1251,24 @@ NTSTATUS WINAPI wow64_NtTerminateThread( UINT *args )
...
@@ -1251,3 +1251,24 @@ NTSTATUS WINAPI wow64_NtTerminateThread( UINT *args )
return
NtTerminateThread
(
handle
,
exit_code
);
return
NtTerminateThread
(
handle
,
exit_code
);
}
}
/**********************************************************************
* Wow64PassExceptionToGuest (wow64.@)
*/
void
WINAPI
Wow64PassExceptionToGuest
(
EXCEPTION_POINTERS
*
ptrs
)
{
EXCEPTION_RECORD
*
rec
=
ptrs
->
ExceptionRecord
;
EXCEPTION_RECORD32
rec32
;
ULONG
i
;
rec32
.
ExceptionCode
=
rec
->
ExceptionCode
;
rec32
.
ExceptionFlags
=
rec
->
ExceptionFlags
;
rec32
.
ExceptionRecord
=
PtrToUlong
(
rec
->
ExceptionRecord
);
rec32
.
ExceptionAddress
=
PtrToUlong
(
rec
->
ExceptionAddress
);
rec32
.
NumberParameters
=
rec
->
NumberParameters
;
for
(
i
=
0
;
i
<
rec
->
NumberParameters
;
i
++
)
rec32
.
ExceptionInformation
[
i
]
=
rec
->
ExceptionInformation
[
i
];
call_user_exception_dispatcher
(
&
rec32
,
NULL
,
ptrs
->
ContextRecord
);
}
dlls/wow64/syscall.c
View file @
23081203
...
@@ -520,6 +520,21 @@ static void free_temp_data(void)
...
@@ -520,6 +520,21 @@ static void free_temp_data(void)
/**********************************************************************
/**********************************************************************
* syscall_filter
*/
static
LONG
CALLBACK
syscall_filter
(
EXCEPTION_POINTERS
*
ptrs
)
{
switch
(
ptrs
->
ExceptionRecord
->
ExceptionCode
)
{
case
STATUS_INVALID_HANDLE
:
Wow64PassExceptionToGuest
(
ptrs
);
break
;
}
return
EXCEPTION_EXECUTE_HANDLER
;
}
/**********************************************************************
* Wow64SystemServiceEx (NTDLL.@)
* Wow64SystemServiceEx (NTDLL.@)
*/
*/
NTSTATUS
WINAPI
Wow64SystemServiceEx
(
UINT
num
,
UINT
*
args
)
NTSTATUS
WINAPI
Wow64SystemServiceEx
(
UINT
num
,
UINT
*
args
)
...
@@ -536,7 +551,7 @@ NTSTATUS WINAPI Wow64SystemServiceEx( UINT num, UINT *args )
...
@@ -536,7 +551,7 @@ NTSTATUS WINAPI Wow64SystemServiceEx( UINT num, UINT *args )
syscall_thunk
thunk
=
syscall_thunks
[
syscall_map
[
num
]];
syscall_thunk
thunk
=
syscall_thunks
[
syscall_map
[
num
]];
status
=
thunk
(
args
);
status
=
thunk
(
args
);
}
}
__EXCEPT
_ALL
__EXCEPT
(
syscall_filter
)
{
{
status
=
GetExceptionCode
();
status
=
GetExceptionCode
();
}
}
...
...
dlls/wow64/wow64.spec
View file @
23081203
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
@ stdcall Wow64LdrpInitialize(ptr)
@ stdcall Wow64LdrpInitialize(ptr)
@ stub Wow64LogPrint
@ stub Wow64LogPrint
@ stub Wow64NotifyUnsimulateComplete
@ stub Wow64NotifyUnsimulateComplete
@ st
ub Wow64PassExceptionToGuest
@ st
dcall Wow64PassExceptionToGuest(ptr)
@ stub Wow64PrepareForDebuggerAttach
@ stub Wow64PrepareForDebuggerAttach
@ stub Wow64PrepareForException
@ stub Wow64PrepareForException
@ stub Wow64RaiseException
@ stub Wow64RaiseException
...
...
dlls/wow64/wow64_private.h
View file @
23081203
...
@@ -28,8 +28,9 @@
...
@@ -28,8 +28,9 @@
ALL_SYSCALLS
ALL_SYSCALLS
#undef SYSCALL_ENTRY
#undef SYSCALL_ENTRY
void
*
WINAPI
Wow64AllocateTemp
(
SIZE_T
size
)
DECLSPEC_HIDDEN
;
void
*
WINAPI
Wow64AllocateTemp
(
SIZE_T
size
);
void
WINAPI
Wow64ApcRoutine
(
ULONG_PTR
arg1
,
ULONG_PTR
arg2
,
ULONG_PTR
arg3
,
CONTEXT
*
context
)
DECLSPEC_HIDDEN
;
void
WINAPI
Wow64ApcRoutine
(
ULONG_PTR
arg1
,
ULONG_PTR
arg2
,
ULONG_PTR
arg3
,
CONTEXT
*
context
);
void
WINAPI
Wow64PassExceptionToGuest
(
EXCEPTION_POINTERS
*
ptrs
);
extern
void
init_file_redirects
(
void
)
DECLSPEC_HIDDEN
;
extern
void
init_file_redirects
(
void
)
DECLSPEC_HIDDEN
;
extern
BOOL
get_file_redirect
(
OBJECT_ATTRIBUTES
*
attr
)
DECLSPEC_HIDDEN
;
extern
BOOL
get_file_redirect
(
OBJECT_ATTRIBUTES
*
attr
)
DECLSPEC_HIDDEN
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment