ntdll: Don't restore the %fs register for exceptions happening inside system calls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
09f2896d95
commit
0b3d65f822
|
@ -355,7 +355,7 @@ static inline struct amd64_thread_data *amd64_thread_data(void)
|
|||
return (struct amd64_thread_data *)ntdll_get_thread_data()->cpu_data;
|
||||
}
|
||||
|
||||
static BOOL is_inside_syscall( ucontext_t *sigcontext )
|
||||
static BOOL is_inside_syscall( const ucontext_t *sigcontext )
|
||||
{
|
||||
return ((char *)RSP_sig(sigcontext) >= (char *)ntdll_get_thread_data()->kernel_stack &&
|
||||
(char *)RSP_sig(sigcontext) <= (char *)amd64_thread_data()->syscall_frame);
|
||||
|
@ -1544,7 +1544,7 @@ static inline void init_handler( const ucontext_t *sigcontext )
|
|||
static inline void leave_handler( const ucontext_t *sigcontext )
|
||||
{
|
||||
#ifdef __linux__
|
||||
if (fs32_sel && !is_inside_signal_stack( (void *)RSP_sig(sigcontext )))
|
||||
if (fs32_sel && !is_inside_signal_stack( (void *)RSP_sig(sigcontext )) && !is_inside_syscall(sigcontext))
|
||||
__asm__ volatile( "movw %0,%%fs" :: "r" (fs32_sel) );
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue