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
82c96f94
Commit
82c96f94
authored
Apr 25, 2022
by
Brendan Shanks
Committed by
Alexandre Julliard
Feb 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Test NtMapViewOfSection with a 64-bit DLL and zero_bits > 31.
parent
81046888
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
virtual.c
dlls/ntdll/tests/virtual.c
+26
-0
No files found.
dlls/ntdll/tests/virtual.c
View file @
82c96f94
...
...
@@ -1265,6 +1265,32 @@ static void test_NtMapViewOfSection(void)
CloseHandle
(
file
);
DeleteFileA
(
testfile
);
/* test zero_bits > 31 with a 64-bit DLL file image mapping */
if
(
is_win64
)
{
file
=
CreateFileA
(
"c:
\\
windows
\\
system32
\\
version.dll"
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"Failed to open version.dll
\n
"
);
mapping
=
CreateFileMappingA
(
file
,
NULL
,
PAGE_READONLY
|
SEC_IMAGE
,
0
,
0
,
NULL
);
ok
(
mapping
!=
0
,
"CreateFileMapping failed
\n
"
);
ptr
=
NULL
;
size
=
0
;
offset
.
QuadPart
=
0
;
zero_bits
=
0x7fffffff
;
status
=
NtMapViewOfSection
(
mapping
,
process
,
&
ptr
,
zero_bits
,
0
,
&
offset
,
&
size
,
1
,
0
,
PAGE_READONLY
);
ok
(
status
==
STATUS_SUCCESS
||
status
==
STATUS_IMAGE_NOT_AT_BASE
,
"NtMapViewOfSection returned %08lx
\n
"
,
status
);
ok
(
!
((
ULONG_PTR
)
ptr
&
0xffff
),
"returned memory %p is not aligned to 64k
\n
"
,
ptr
);
ok
(((
UINT_PTR
)
ptr
&
~
get_zero_bits_mask
(
zero_bits
))
==
0
,
"NtMapViewOfSection returned address %p
\n
"
,
ptr
);
status
=
NtUnmapViewOfSection
(
process
,
ptr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtUnmapViewOfSection returned %08lx
\n
"
,
status
);
NtClose
(
mapping
);
CloseHandle
(
file
);
}
TerminateProcess
(
process
,
0
);
CloseHandle
(
process
);
}
...
...
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