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
37705d9f
Commit
37705d9f
authored
Jul 09, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Don't restore %fs selector on nested signals.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4e37f2d1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
signal_x86_64.c
dlls/ntdll/unix/signal_x86_64.c
+3
-2
unix_private.h
dlls/ntdll/unix/unix_private.h
+6
-0
virtual.c
dlls/ntdll/unix/virtual.c
+0
-6
No files found.
dlls/ntdll/unix/signal_x86_64.c
View file @
37705d9f
...
...
@@ -1542,7 +1542,8 @@ static inline void init_handler( const ucontext_t *sigcontext )
static
inline
void
leave_handler
(
const
ucontext_t
*
sigcontext
)
{
#ifdef __linux__
if
(
fs32_sel
)
__asm__
volatile
(
"movw %0,%%fs"
::
"r"
(
fs32_sel
)
);
if
(
fs32_sel
&&
!
is_inside_signal_stack
(
(
void
*
)
RSP_sig
(
sigcontext
)))
__asm__
volatile
(
"movw %0,%%fs"
::
"r"
(
fs32_sel
)
);
#endif
}
...
...
@@ -1997,7 +1998,7 @@ NTSTATUS set_thread_wow64_context( HANDLE handle, const void *ctx, ULONG size )
memcpy
(
&
frame
->
xstate
.
YmmContext
,
&
xs
->
YmmContext
,
sizeof
(
xs
->
YmmContext
)
);
}
else
frame
->
xstate
.
Mask
&=
~
XSTATE_MASK_GSSE
;
frame
->
restore_flags
|=
CONTEXT_
I386_
XSTATE
;
frame
->
restore_flags
|=
CONTEXT_XSTATE
;
}
return
STATUS_SUCCESS
;
}
...
...
dlls/ntdll/unix/unix_private.h
View file @
37705d9f
...
...
@@ -318,6 +318,12 @@ static inline void *get_signal_stack(void)
return
(
void
*
)(((
ULONG_PTR
)
NtCurrentTeb
()
&
~
signal_stack_mask
)
+
teb_size
);
}
static
inline
BOOL
is_inside_signal_stack
(
void
*
ptr
)
{
return
((
char
*
)
ptr
>=
(
char
*
)
get_signal_stack
()
&&
(
char
*
)
ptr
<
(
char
*
)
get_signal_stack
()
+
signal_stack_size
);
}
static
inline
void
mutex_lock
(
pthread_mutex_t
*
mutex
)
{
if
(
!
process_exiting
)
pthread_mutex_lock
(
mutex
);
...
...
dlls/ntdll/unix/virtual.c
View file @
37705d9f
...
...
@@ -237,12 +237,6 @@ static struct range_entry *free_ranges;
static
struct
range_entry
*
free_ranges_end
;
static
inline
BOOL
is_inside_signal_stack
(
void
*
ptr
)
{
return
((
char
*
)
ptr
>=
(
char
*
)
get_signal_stack
()
&&
(
char
*
)
ptr
<
(
char
*
)
get_signal_stack
()
+
signal_stack_size
);
}
static
inline
BOOL
is_beyond_limit
(
const
void
*
addr
,
size_t
size
,
const
void
*
limit
)
{
return
(
addr
>=
limit
||
(
const
char
*
)
addr
+
size
>
(
const
char
*
)
limit
);
...
...
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