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
bd703632
Commit
bd703632
authored
Feb 08, 2024
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Don't update the machine in the image information for ARM64EC modules.
parent
ce4636e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
18 deletions
+15
-18
mapping.c
server/mapping.c
+13
-18
object.h
server/object.h
+1
-0
process.c
server/process.c
+1
-0
No files found.
server/mapping.c
View file @
bd703632
...
@@ -404,14 +404,6 @@ struct memory_view *get_exe_view( struct process *process )
...
@@ -404,14 +404,6 @@ struct memory_view *get_exe_view( struct process *process )
return
LIST_ENTRY
(
list_head
(
&
process
->
views
),
struct
memory_view
,
entry
);
return
LIST_ENTRY
(
list_head
(
&
process
->
views
),
struct
memory_view
,
entry
);
}
}
static
void
set_process_machine
(
struct
process
*
process
,
struct
memory_view
*
view
)
{
if
(
view
->
image
.
image_flags
&
IMAGE_FLAGS_ComPlusNativeReady
)
process
->
machine
=
native_machine
;
else
process
->
machine
=
view
->
image
.
machine
;
}
static
int
generate_dll_event
(
struct
thread
*
thread
,
int
code
,
struct
memory_view
*
view
)
static
int
generate_dll_event
(
struct
thread
*
thread
,
int
code
,
struct
memory_view
*
view
)
{
{
if
(
!
(
view
->
flags
&
SEC_IMAGE
))
return
0
;
if
(
!
(
view
->
flags
&
SEC_IMAGE
))
return
0
;
...
@@ -420,7 +412,8 @@ static int generate_dll_event( struct thread *thread, int code, struct memory_vi
...
@@ -420,7 +412,8 @@ static int generate_dll_event( struct thread *thread, int code, struct memory_vi
}
}
/* add a view to the process list */
/* add a view to the process list */
static
void
add_process_view
(
struct
thread
*
thread
,
struct
memory_view
*
view
)
/* return 1 if this is the main exe view */
static
int
add_process_view
(
struct
thread
*
thread
,
struct
memory_view
*
view
)
{
{
struct
process
*
process
=
thread
->
process
;
struct
process
*
process
=
thread
->
process
;
struct
unicode_str
name
;
struct
unicode_str
name
;
...
@@ -434,18 +427,17 @@ static void add_process_view( struct thread *thread, struct memory_view *view )
...
@@ -434,18 +427,17 @@ static void add_process_view( struct thread *thread, struct memory_view *view )
else
if
(
!
(
view
->
image
.
image_charact
&
IMAGE_FILE_DLL
))
else
if
(
!
(
view
->
image
.
image_charact
&
IMAGE_FILE_DLL
))
{
{
/* main exe */
/* main exe */
set_process_machine
(
process
,
view
);
list_add_head
(
&
process
->
views
,
&
view
->
entry
);
free
(
process
->
image
);
free
(
process
->
image
);
process
->
image
=
NULL
;
process
->
image
=
NULL
;
if
(
get_view_nt_name
(
view
,
&
name
)
&&
(
process
->
image
=
memdup
(
name
.
str
,
name
.
len
)))
if
(
get_view_nt_name
(
view
,
&
name
)
&&
(
process
->
image
=
memdup
(
name
.
str
,
name
.
len
)))
process
->
imagelen
=
name
.
len
;
process
->
imagelen
=
name
.
len
;
process
->
image_info
=
view
->
image
;
process
->
image_info
=
view
->
image
;
return
;
list_add_head
(
&
process
->
views
,
&
view
->
entry
);
return
1
;
}
}
}
}
list_add_tail
(
&
process
->
views
,
&
view
->
entry
);
list_add_tail
(
&
process
->
views
,
&
view
->
entry
);
return
0
;
}
}
static
void
free_memory_view
(
struct
memory_view
*
view
)
static
void
free_memory_view
(
struct
memory_view
*
view
)
...
@@ -1401,16 +1393,19 @@ DECL_HANDLER(map_image_view)
...
@@ -1401,16 +1393,19 @@ DECL_HANDLER(map_image_view)
view
->
committed
=
NULL
;
view
->
committed
=
NULL
;
view
->
shared
=
mapping
->
shared
?
(
struct
shared_map
*
)
grab_object
(
mapping
->
shared
)
:
NULL
;
view
->
shared
=
mapping
->
shared
?
(
struct
shared_map
*
)
grab_object
(
mapping
->
shared
)
:
NULL
;
view
->
image
=
mapping
->
image
;
view
->
image
=
mapping
->
image
;
view
->
image
.
machine
=
req
->
machine
;
view
->
image
.
entry_point
=
req
->
entry
;
view
->
image
.
entry_point
=
req
->
entry
;
add_process_view
(
current
,
view
);
if
(
add_process_view
(
current
,
view
))
{
current
->
process
->
machine
=
(
view
->
image
.
image_flags
&
IMAGE_FLAGS_ComPlusNativeReady
)
?
native_machine
:
req
->
machine
;
}
if
(
view
->
base
!=
(
mapping
->
image
.
map_addr
?
mapping
->
image
.
map_addr
:
mapping
->
image
.
base
))
if
(
view
->
base
!=
(
mapping
->
image
.
map_addr
?
mapping
->
image
.
map_addr
:
mapping
->
image
.
base
))
set_error
(
STATUS_IMAGE_NOT_AT_BASE
);
set_error
(
STATUS_IMAGE_NOT_AT_BASE
);
if
(
view
->
image
.
machine
!=
current
->
process
->
machine
)
if
(
req
->
machine
!=
current
->
process
->
machine
)
{
{
/* on 32-bit, the native 64-bit machine is allowed */
/* on 32-bit, the native 64-bit machine is allowed */
if
(
is_machine_64bit
(
current
->
process
->
machine
)
||
view
->
image
.
machine
!=
native_machine
)
if
(
is_machine_64bit
(
current
->
process
->
machine
)
||
req
->
machine
!=
native_machine
)
set_error
(
STATUS_IMAGE_MACHINE_TYPE_MISMATCH
);
set_error
(
STATUS_IMAGE_MACHINE_TYPE_MISMATCH
);
}
}
}
}
...
@@ -1443,7 +1438,7 @@ DECL_HANDLER(map_builtin_view)
...
@@ -1443,7 +1438,7 @@ DECL_HANDLER(map_builtin_view)
view
->
image
=
*
image
;
view
->
image
=
*
image
;
view
->
namelen
=
namelen
;
view
->
namelen
=
namelen
;
memcpy
(
view
->
name
,
image
+
1
,
namelen
);
memcpy
(
view
->
name
,
image
+
1
,
namelen
);
add_process_view
(
current
,
view
)
;
if
(
add_process_view
(
current
,
view
))
current
->
process
->
machine
=
image
->
machine
;
}
}
}
}
...
...
server/object.h
View file @
bd703632
...
@@ -253,6 +253,7 @@ static inline int is_machine_supported( unsigned short machine )
...
@@ -253,6 +253,7 @@ static inline int is_machine_supported( unsigned short machine )
{
{
unsigned
int
i
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
supported_machines_count
;
i
++
)
if
(
supported_machines
[
i
]
==
machine
)
return
1
;
for
(
i
=
0
;
i
<
supported_machines_count
;
i
++
)
if
(
supported_machines
[
i
]
==
machine
)
return
1
;
if
(
native_machine
==
IMAGE_FILE_MACHINE_ARM64
)
return
machine
==
IMAGE_FILE_MACHINE_AMD64
;
return
0
;
return
0
;
}
}
...
...
server/process.c
View file @
bd703632
...
@@ -656,6 +656,7 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
...
@@ -656,6 +656,7 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
process
->
msg_fd
=
NULL
;
process
->
msg_fd
=
NULL
;
process
->
sigkill_timeout
=
NULL
;
process
->
sigkill_timeout
=
NULL
;
process
->
sigkill_delay
=
TICKS_PER_SEC
/
64
;
process
->
sigkill_delay
=
TICKS_PER_SEC
/
64
;
process
->
machine
=
native_machine
;
process
->
unix_pid
=
-
1
;
process
->
unix_pid
=
-
1
;
process
->
exit_code
=
STILL_ACTIVE
;
process
->
exit_code
=
STILL_ACTIVE
;
process
->
running_threads
=
0
;
process
->
running_threads
=
0
;
...
...
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