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
b2a099b3
Commit
b2a099b3
authored
Aug 09, 2023
by
Tim Clem
Committed by
Alexandre Julliard
Aug 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Avoid a mach port leak on Apple Silicon.
Check for Rosetta before extracting the port right, since we won't need it in that case anyway.
parent
1135543d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
mach.c
server/mach.c
+8
-8
No files found.
server/mach.c
View file @
b2a099b3
...
@@ -273,14 +273,6 @@ void set_thread_context( struct thread *thread, const context_t *context, unsign
...
@@ -273,14 +273,6 @@ void set_thread_context( struct thread *thread, const context_t *context, unsign
/* all other regs are handled on the client side */
/* all other regs are handled on the client side */
assert
(
flags
==
SERVER_CTX_DEBUG_REGISTERS
);
assert
(
flags
==
SERVER_CTX_DEBUG_REGISTERS
);
if
(
thread
->
unix_pid
==
-
1
||
!
process_port
||
mach_port_extract_right
(
process_port
,
thread
->
unix_tid
,
MACH_MSG_TYPE_COPY_SEND
,
&
port
,
&
type
))
{
set_error
(
STATUS_ACCESS_DENIED
);
return
;
}
if
(
is_rosetta
())
if
(
is_rosetta
())
{
{
/* Setting debug registers of a translated process is not supported cross-process
/* Setting debug registers of a translated process is not supported cross-process
...
@@ -290,6 +282,14 @@ void set_thread_context( struct thread *thread, const context_t *context, unsign
...
@@ -290,6 +282,14 @@ void set_thread_context( struct thread *thread, const context_t *context, unsign
return
;
return
;
}
}
if
(
thread
->
unix_pid
==
-
1
||
!
process_port
||
mach_port_extract_right
(
process_port
,
thread
->
unix_tid
,
MACH_MSG_TYPE_COPY_SEND
,
&
port
,
&
type
))
{
set_error
(
STATUS_ACCESS_DENIED
);
return
;
}
/* get the debug state to determine which flavor to use */
/* get the debug state to determine which flavor to use */
ret
=
thread_get_state
(
port
,
x86_DEBUG_STATE
,
(
thread_state_t
)
&
state
,
&
count
);
ret
=
thread_get_state
(
port
,
x86_DEBUG_STATE
,
(
thread_state_t
)
&
state
,
&
count
);
if
(
ret
)
if
(
ret
)
...
...
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