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
94ac9895
Commit
94ac9895
authored
Dec 07, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix the failing loader tests.
parent
34c40097
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
15 deletions
+5
-15
loader.c
dlls/kernel32/tests/loader.c
+0
-12
virtual.c
dlls/ntdll/virtual.c
+5
-3
No files found.
dlls/kernel32/tests/loader.c
View file @
94ac9895
...
...
@@ -294,16 +294,12 @@ START_TEST(loader)
{
ok
(
info
.
BaseAddress
==
(
char
*
)
hlib
+
ALIGN_SIZE
(
nt_header
.
OptionalHeader
.
SizeOfImage
,
si
.
dwPageSize
),
"%d: %p != %p
\n
"
,
i
,
info
.
BaseAddress
,
(
char
*
)
hlib
+
ALIGN_SIZE
(
nt_header
.
OptionalHeader
.
SizeOfImage
,
si
.
dwPageSize
));
todo_wine
{
ok
(
info
.
AllocationBase
==
0
,
"%d: %p != 0
\n
"
,
i
,
info
.
AllocationBase
);
}
ok
(
info
.
AllocationProtect
==
0
,
"%d: %x != 0
\n
"
,
i
,
info
.
AllocationProtect
);
/*ok(info.RegionSize == not_practical_value, "%d: %lx != not_practical_value\n", i, info.RegionSize);*/
ok
(
info
.
State
==
MEM_FREE
,
"%d: %x != MEM_FREE
\n
"
,
i
,
info
.
State
);
ok
(
info
.
Type
==
0
,
"%d: %x != 0
\n
"
,
i
,
info
.
Type
);
todo_wine
{
ok
(
info
.
Protect
==
PAGE_NOACCESS
,
"%d: %x != PAGE_NOACCESS
\n
"
,
i
,
info
.
Protect
);
}
}
else
{
...
...
@@ -322,14 +318,6 @@ todo_wine {
}
else
{
/* LoadLibrary has failed */
if
(
hlib
)
/* remove completely once Wine is fixed */
{
todo_wine
ok
(
!
hlib
,
"%d: LoadLibrary should fail
\n
"
,
i
);
FreeLibrary
(
hlib
);
DeleteFile
(
dll_name
);
continue
;
}
ok
(
!
hlib
,
"%d: LoadLibrary should fail
\n
"
,
i
);
if
(
GetLastError
()
==
ERROR_GEN_FAILURE
)
/* Win9x, broken behaviour */
...
...
dlls/ntdll/virtual.c
View file @
94ac9895
...
...
@@ -1021,6 +1021,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
removable
)
!=
STATUS_SUCCESS
)
goto
error
;
/* check that all sections are loaded at the right offset */
if
(
nt
->
OptionalHeader
.
FileAlignment
!=
nt
->
OptionalHeader
.
SectionAlignment
)
goto
error
;
for
(
i
=
0
;
i
<
nt
->
FileHeader
.
NumberOfSections
;
i
++
)
{
if
(
sec
[
i
].
VirtualAddress
!=
sec
[
i
].
PointerToRawData
)
...
...
@@ -1710,7 +1711,8 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr,
if
(
!
view
)
{
info
->
State
=
MEM_FREE
;
info
->
Protect
=
0
;
info
->
Protect
=
PAGE_NOACCESS
;
info
->
AllocationBase
=
0
;
info
->
AllocationProtect
=
0
;
info
->
Type
=
0
;
}
...
...
@@ -1719,6 +1721,7 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr,
BYTE
vprot
=
view
->
prot
[(
base
-
alloc_base
)
>>
page_shift
];
info
->
State
=
(
vprot
&
VPROT_COMMITTED
)
?
MEM_COMMIT
:
MEM_RESERVE
;
info
->
Protect
=
VIRTUAL_GetWin32Prot
(
vprot
);
info
->
AllocationBase
=
alloc_base
;
info
->
AllocationProtect
=
VIRTUAL_GetWin32Prot
(
view
->
protect
);
if
(
view
->
protect
&
VPROT_IMAGE
)
info
->
Type
=
MEM_IMAGE
;
else
if
(
view
->
flags
&
VFLAG_VALLOC
)
info
->
Type
=
MEM_PRIVATE
;
...
...
@@ -1728,8 +1731,7 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr,
}
RtlLeaveCriticalSection
(
&
csVirtual
);
info
->
BaseAddress
=
(
LPVOID
)
base
;
info
->
AllocationBase
=
(
LPVOID
)
alloc_base
;
info
->
BaseAddress
=
base
;
info
->
RegionSize
=
size
-
(
base
-
alloc_base
);
if
(
res_len
)
*
res_len
=
sizeof
(
*
info
);
return
STATUS_SUCCESS
;
...
...
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