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
83c272a2
Commit
83c272a2
authored
Mar 03, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Return STATUS_IMAGE_NOT_AT_BASE when an image mapping has to be relocated.
parent
74a059d2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
virtual.c
dlls/kernel32/virtual.c
+1
-1
loader.c
dlls/ntdll/loader.c
+1
-1
virtual.c
dlls/ntdll/virtual.c
+3
-2
No files found.
dlls/kernel32/virtual.c
View file @
83c272a2
...
@@ -545,7 +545,7 @@ LPVOID WINAPI MapViewOfFileEx( HANDLE handle, DWORD access,
...
@@ -545,7 +545,7 @@ LPVOID WINAPI MapViewOfFileEx( HANDLE handle, DWORD access,
if
(
access
&
FILE_MAP_EXECUTE
)
protect
<<=
4
;
if
(
access
&
FILE_MAP_EXECUTE
)
protect
<<=
4
;
if
((
status
=
NtMapViewOfSection
(
handle
,
GetCurrentProcess
(),
&
addr
,
0
,
0
,
&
offset
,
if
((
status
=
NtMapViewOfSection
(
handle
,
GetCurrentProcess
(),
&
addr
,
0
,
0
,
&
offset
,
&
count
,
ViewShare
,
0
,
protect
)))
&
count
,
ViewShare
,
0
,
protect
))
<
0
)
{
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
addr
=
NULL
;
addr
=
NULL
;
...
...
dlls/ntdll/loader.c
View file @
83c272a2
...
@@ -1498,7 +1498,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file,
...
@@ -1498,7 +1498,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file,
status
=
NtMapViewOfSection
(
mapping
,
NtCurrentProcess
(),
status
=
NtMapViewOfSection
(
mapping
,
NtCurrentProcess
(),
&
module
,
0
,
0
,
&
size
,
&
len
,
ViewShare
,
0
,
PAGE_READONLY
);
&
module
,
0
,
0
,
&
size
,
&
len
,
ViewShare
,
0
,
PAGE_READONLY
);
NtClose
(
mapping
);
NtClose
(
mapping
);
if
(
status
!=
STATUS_SUCCESS
)
return
status
;
if
(
status
<
0
)
return
status
;
/* create the MODREF */
/* create the MODREF */
...
...
dlls/ntdll/virtual.c
View file @
83c272a2
...
@@ -1296,6 +1296,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
...
@@ -1296,6 +1296,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
#ifdef VALGRIND_LOAD_PDB_DEBUGINFO
#ifdef VALGRIND_LOAD_PDB_DEBUGINFO
VALGRIND_LOAD_PDB_DEBUGINFO
(
fd
,
ptr
,
total_size
,
delta
);
VALGRIND_LOAD_PDB_DEBUGINFO
(
fd
,
ptr
,
total_size
,
delta
);
#endif
#endif
if
(
ptr
!=
base
)
return
STATUS_IMAGE_NOT_AT_BASE
;
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
error:
error:
...
@@ -2409,7 +2410,7 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
...
@@ -2409,7 +2410,7 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
res
=
NTDLL_queue_process_apc
(
process
,
&
call
,
&
result
);
res
=
NTDLL_queue_process_apc
(
process
,
&
call
,
&
result
);
if
(
res
!=
STATUS_SUCCESS
)
return
res
;
if
(
res
!=
STATUS_SUCCESS
)
return
res
;
if
(
result
.
map_view
.
status
==
STATUS_SUCCESS
)
if
(
(
NTSTATUS
)
result
.
map_view
.
status
>=
0
)
{
{
*
addr_ptr
=
wine_server_get_ptr
(
result
.
map_view
.
addr
);
*
addr_ptr
=
wine_server_get_ptr
(
result
.
map_view
.
addr
);
*
size_ptr
=
result
.
map_view
.
size
;
*
size_ptr
=
result
.
map_view
.
size
;
...
@@ -2461,7 +2462,7 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
...
@@ -2461,7 +2462,7 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
-
1
,
dup_mapping
,
addr_ptr
);
-
1
,
dup_mapping
,
addr_ptr
);
}
}
if
(
needs_close
)
close
(
unix_handle
);
if
(
needs_close
)
close
(
unix_handle
);
if
(
!
res
)
*
size_ptr
=
size
;
if
(
res
>=
0
)
*
size_ptr
=
size
;
return
res
;
return
res
;
}
}
...
...
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