Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
079179fe
Commit
079179fe
authored
Jul 19, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Suppress callback exceptions in KiUserCallbackDispatcher.
parent
c1c57bd7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
68 additions
and
8 deletions
+68
-8
signal_arm.c
dlls/ntdll/signal_arm.c
+14
-2
signal_arm64.c
dlls/ntdll/signal_arm64.c
+14
-2
signal_i386.c
dlls/ntdll/signal_i386.c
+14
-2
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+14
-2
signal_arm.c
dlls/ntdll/unix/signal_arm.c
+3
-0
signal_arm64.c
dlls/ntdll/unix/signal_arm64.c
+3
-0
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+3
-0
signal_x86_64.c
dlls/ntdll/unix/signal_x86_64.c
+3
-0
No files found.
dlls/ntdll/signal_arm.c
View file @
079179fe
...
@@ -533,9 +533,21 @@ void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1
...
@@ -533,9 +533,21 @@ void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1
*/
*/
void
WINAPI
KiUserCallbackDispatcher
(
ULONG
id
,
void
*
args
,
ULONG
len
)
void
WINAPI
KiUserCallbackDispatcher
(
ULONG
id
,
void
*
args
,
ULONG
len
)
{
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
NTSTATUS
status
;
__TRY
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
status
=
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
));
}
__EXCEPT_ALL
{
ERR_
(
seh
)(
"ignoring exception
\n
"
);
status
=
NtCallbackReturn
(
0
,
0
,
0
);
}
__ENDTRY
RtlRaiseStatus
(
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
))
);
RtlRaiseStatus
(
status
);
}
}
...
...
dlls/ntdll/signal_arm64.c
View file @
079179fe
...
@@ -576,9 +576,21 @@ void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR arg1, ULONG_PTR arg
...
@@ -576,9 +576,21 @@ void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR arg1, ULONG_PTR arg
*/
*/
void
WINAPI
KiUserCallbackDispatcher
(
ULONG
id
,
void
*
args
,
ULONG
len
)
void
WINAPI
KiUserCallbackDispatcher
(
ULONG
id
,
void
*
args
,
ULONG
len
)
{
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
NTSTATUS
status
;
__TRY
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
status
=
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
));
}
__EXCEPT_ALL
{
ERR_
(
seh
)(
"ignoring exception
\n
"
);
status
=
NtCallbackReturn
(
0
,
0
,
0
);
}
__ENDTRY
RtlRaiseStatus
(
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
))
);
RtlRaiseStatus
(
status
);
}
}
...
...
dlls/ntdll/signal_i386.c
View file @
079179fe
...
@@ -257,9 +257,21 @@ void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1
...
@@ -257,9 +257,21 @@ void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1
*/
*/
void
WINAPI
KiUserCallbackDispatcher
(
ULONG
id
,
void
*
args
,
ULONG
len
)
void
WINAPI
KiUserCallbackDispatcher
(
ULONG
id
,
void
*
args
,
ULONG
len
)
{
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
NTSTATUS
status
;
__TRY
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
status
=
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
));
}
__EXCEPT_ALL
{
ERR_
(
seh
)(
"ignoring exception
\n
"
);
status
=
NtCallbackReturn
(
0
,
0
,
0
);
}
__ENDTRY
RtlRaiseStatus
(
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
))
);
RtlRaiseStatus
(
status
);
}
}
...
...
dlls/ntdll/signal_x86_64.c
View file @
079179fe
...
@@ -661,9 +661,21 @@ __ASM_GLOBAL_FUNC( KiUserApcDispatcher,
...
@@ -661,9 +661,21 @@ __ASM_GLOBAL_FUNC( KiUserApcDispatcher,
*/
*/
void
WINAPI
KiUserCallbackDispatcher
(
ULONG
id
,
void
*
args
,
ULONG
len
)
void
WINAPI
KiUserCallbackDispatcher
(
ULONG
id
,
void
*
args
,
ULONG
len
)
{
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
NTSTATUS
status
;
__TRY
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
status
=
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
));
}
__EXCEPT_ALL
{
ERR_
(
seh
)(
"ignoring exception
\n
"
);
status
=
NtCallbackReturn
(
0
,
0
,
0
);
}
__ENDTRY
RtlRaiseStatus
(
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
))
);
RtlRaiseStatus
(
status
);
}
}
...
...
dlls/ntdll/unix/signal_arm.c
View file @
079179fe
...
@@ -721,6 +721,7 @@ struct user_callback_frame
...
@@ -721,6 +721,7 @@ struct user_callback_frame
ULONG
*
ret_len
;
ULONG
*
ret_len
;
__wine_jmp_buf
jmpbuf
;
__wine_jmp_buf
jmpbuf
;
NTSTATUS
status
;
NTSTATUS
status
;
void
*
teb_frame
;
};
};
/***********************************************************************
/***********************************************************************
...
@@ -756,6 +757,7 @@ NTSTATUS WINAPI KeUserModeCallback( ULONG id, const void *args, ULONG len, void
...
@@ -756,6 +757,7 @@ NTSTATUS WINAPI KeUserModeCallback( ULONG id, const void *args, ULONG len, void
callback_frame
.
frame
.
restore_flags
=
CONTEXT_INTEGER
;
callback_frame
.
frame
.
restore_flags
=
CONTEXT_INTEGER
;
callback_frame
.
frame
.
syscall_table
=
frame
->
syscall_table
;
callback_frame
.
frame
.
syscall_table
=
frame
->
syscall_table
;
callback_frame
.
frame
.
prev_frame
=
frame
;
callback_frame
.
frame
.
prev_frame
=
frame
;
callback_frame
.
teb_frame
=
NtCurrentTeb
()
->
Tib
.
ExceptionList
;
arm_thread_data
()
->
syscall_frame
=
&
callback_frame
.
frame
;
arm_thread_data
()
->
syscall_frame
=
&
callback_frame
.
frame
;
__wine_syscall_dispatcher_return
(
&
callback_frame
.
frame
,
0
);
__wine_syscall_dispatcher_return
(
&
callback_frame
.
frame
,
0
);
...
@@ -777,6 +779,7 @@ NTSTATUS WINAPI NtCallbackReturn( void *ret_ptr, ULONG ret_len, NTSTATUS status
...
@@ -777,6 +779,7 @@ NTSTATUS WINAPI NtCallbackReturn( void *ret_ptr, ULONG ret_len, NTSTATUS status
*
frame
->
ret_len
=
ret_len
;
*
frame
->
ret_len
=
ret_len
;
frame
->
status
=
status
;
frame
->
status
=
status
;
arm_thread_data
()
->
syscall_frame
=
frame
->
frame
.
prev_frame
;
arm_thread_data
()
->
syscall_frame
=
frame
->
frame
.
prev_frame
;
NtCurrentTeb
()
->
Tib
.
ExceptionList
=
frame
->
teb_frame
;
__wine_longjmp
(
&
frame
->
jmpbuf
,
1
);
__wine_longjmp
(
&
frame
->
jmpbuf
,
1
);
}
}
...
...
dlls/ntdll/unix/signal_arm64.c
View file @
079179fe
...
@@ -730,6 +730,7 @@ struct user_callback_frame
...
@@ -730,6 +730,7 @@ struct user_callback_frame
ULONG
*
ret_len
;
ULONG
*
ret_len
;
__wine_jmp_buf
jmpbuf
;
__wine_jmp_buf
jmpbuf
;
NTSTATUS
status
;
NTSTATUS
status
;
void
*
teb_frame
;
};
};
/***********************************************************************
/***********************************************************************
...
@@ -766,6 +767,7 @@ NTSTATUS WINAPI KeUserModeCallback( ULONG id, const void *args, ULONG len, void
...
@@ -766,6 +767,7 @@ NTSTATUS WINAPI KeUserModeCallback( ULONG id, const void *args, ULONG len, void
callback_frame
.
frame
.
restore_flags
=
CONTEXT_INTEGER
;
callback_frame
.
frame
.
restore_flags
=
CONTEXT_INTEGER
;
callback_frame
.
frame
.
syscall_table
=
frame
->
syscall_table
;
callback_frame
.
frame
.
syscall_table
=
frame
->
syscall_table
;
callback_frame
.
frame
.
prev_frame
=
frame
;
callback_frame
.
frame
.
prev_frame
=
frame
;
callback_frame
.
teb_frame
=
NtCurrentTeb
()
->
Tib
.
ExceptionList
;
arm64_thread_data
()
->
syscall_frame
=
&
callback_frame
.
frame
;
arm64_thread_data
()
->
syscall_frame
=
&
callback_frame
.
frame
;
__wine_syscall_dispatcher_return
(
&
callback_frame
.
frame
,
0
);
__wine_syscall_dispatcher_return
(
&
callback_frame
.
frame
,
0
);
...
@@ -787,6 +789,7 @@ NTSTATUS WINAPI NtCallbackReturn( void *ret_ptr, ULONG ret_len, NTSTATUS status
...
@@ -787,6 +789,7 @@ NTSTATUS WINAPI NtCallbackReturn( void *ret_ptr, ULONG ret_len, NTSTATUS status
*
frame
->
ret_len
=
ret_len
;
*
frame
->
ret_len
=
ret_len
;
frame
->
status
=
status
;
frame
->
status
=
status
;
arm64_thread_data
()
->
syscall_frame
=
frame
->
frame
.
prev_frame
;
arm64_thread_data
()
->
syscall_frame
=
frame
->
frame
.
prev_frame
;
NtCurrentTeb
()
->
Tib
.
ExceptionList
=
frame
->
teb_frame
;
__wine_longjmp
(
&
frame
->
jmpbuf
,
1
);
__wine_longjmp
(
&
frame
->
jmpbuf
,
1
);
}
}
...
...
dlls/ntdll/unix/signal_i386.c
View file @
079179fe
...
@@ -1575,6 +1575,7 @@ struct user_callback_frame
...
@@ -1575,6 +1575,7 @@ struct user_callback_frame
ULONG
*
ret_len
;
ULONG
*
ret_len
;
__wine_jmp_buf
jmpbuf
;
__wine_jmp_buf
jmpbuf
;
NTSTATUS
status
;
NTSTATUS
status
;
void
*
teb_frame
;
};
};
/***********************************************************************
/***********************************************************************
...
@@ -1614,6 +1615,7 @@ NTSTATUS WINAPI KeUserModeCallback( ULONG id, const void *args, ULONG len, void
...
@@ -1614,6 +1615,7 @@ NTSTATUS WINAPI KeUserModeCallback( ULONG id, const void *args, ULONG len, void
callback_frame
.
frame
.
syscall_flags
=
frame
->
syscall_flags
;
callback_frame
.
frame
.
syscall_flags
=
frame
->
syscall_flags
;
callback_frame
.
frame
.
syscall_table
=
frame
->
syscall_table
;
callback_frame
.
frame
.
syscall_table
=
frame
->
syscall_table
;
callback_frame
.
frame
.
prev_frame
=
frame
;
callback_frame
.
frame
.
prev_frame
=
frame
;
callback_frame
.
teb_frame
=
NtCurrentTeb
()
->
Tib
.
ExceptionList
;
x86_thread_data
()
->
syscall_frame
=
&
callback_frame
.
frame
;
x86_thread_data
()
->
syscall_frame
=
&
callback_frame
.
frame
;
__wine_syscall_dispatcher_return
(
&
callback_frame
.
frame
,
0
);
__wine_syscall_dispatcher_return
(
&
callback_frame
.
frame
,
0
);
...
@@ -1635,6 +1637,7 @@ NTSTATUS WINAPI NtCallbackReturn( void *ret_ptr, ULONG ret_len, NTSTATUS status
...
@@ -1635,6 +1637,7 @@ NTSTATUS WINAPI NtCallbackReturn( void *ret_ptr, ULONG ret_len, NTSTATUS status
*
frame
->
ret_len
=
ret_len
;
*
frame
->
ret_len
=
ret_len
;
frame
->
status
=
status
;
frame
->
status
=
status
;
x86_thread_data
()
->
syscall_frame
=
frame
->
frame
.
prev_frame
;
x86_thread_data
()
->
syscall_frame
=
frame
->
frame
.
prev_frame
;
NtCurrentTeb
()
->
Tib
.
ExceptionList
=
frame
->
teb_frame
;
__wine_longjmp
(
&
frame
->
jmpbuf
,
1
);
__wine_longjmp
(
&
frame
->
jmpbuf
,
1
);
}
}
...
...
dlls/ntdll/unix/signal_x86_64.c
View file @
079179fe
...
@@ -2327,6 +2327,7 @@ struct user_callback_frame
...
@@ -2327,6 +2327,7 @@ struct user_callback_frame
ULONG
*
ret_len
;
ULONG
*
ret_len
;
__wine_jmp_buf
jmpbuf
;
__wine_jmp_buf
jmpbuf
;
NTSTATUS
status
;
NTSTATUS
status
;
void
*
teb_frame
;
};
};
/***********************************************************************
/***********************************************************************
...
@@ -2368,6 +2369,7 @@ NTSTATUS WINAPI KeUserModeCallback( ULONG id, const void *args, ULONG len, void
...
@@ -2368,6 +2369,7 @@ NTSTATUS WINAPI KeUserModeCallback( ULONG id, const void *args, ULONG len, void
callback_frame
.
frame
.
prev_frame
=
frame
;
callback_frame
.
frame
.
prev_frame
=
frame
;
callback_frame
.
frame
.
syscall_flags
=
frame
->
syscall_flags
;
callback_frame
.
frame
.
syscall_flags
=
frame
->
syscall_flags
;
callback_frame
.
frame
.
syscall_table
=
frame
->
syscall_table
;
callback_frame
.
frame
.
syscall_table
=
frame
->
syscall_table
;
callback_frame
.
teb_frame
=
NtCurrentTeb
()
->
Tib
.
ExceptionList
;
amd64_thread_data
()
->
syscall_frame
=
&
callback_frame
.
frame
;
amd64_thread_data
()
->
syscall_frame
=
&
callback_frame
.
frame
;
__wine_syscall_dispatcher_return
(
&
callback_frame
.
frame
,
0
);
__wine_syscall_dispatcher_return
(
&
callback_frame
.
frame
,
0
);
...
@@ -2389,6 +2391,7 @@ NTSTATUS WINAPI NtCallbackReturn( void *ret_ptr, ULONG ret_len, NTSTATUS status
...
@@ -2389,6 +2391,7 @@ NTSTATUS WINAPI NtCallbackReturn( void *ret_ptr, ULONG ret_len, NTSTATUS status
*
frame
->
ret_len
=
ret_len
;
*
frame
->
ret_len
=
ret_len
;
frame
->
status
=
status
;
frame
->
status
=
status
;
amd64_thread_data
()
->
syscall_frame
=
frame
->
frame
.
prev_frame
;
amd64_thread_data
()
->
syscall_frame
=
frame
->
frame
.
prev_frame
;
NtCurrentTeb
()
->
Tib
.
ExceptionList
=
frame
->
teb_frame
;
__wine_longjmp
(
&
frame
->
jmpbuf
,
1
);
__wine_longjmp
(
&
frame
->
jmpbuf
,
1
);
}
}
...
...
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