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
211293ea
Commit
211293ea
authored
Sep 01, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Fix alignment issues on 64-bit.
parent
d6420080
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
loader.c
dlls/kernel32/tests/loader.c
+9
-9
No files found.
dlls/kernel32/tests/loader.c
View file @
211293ea
...
...
@@ -34,7 +34,7 @@
/* PROCESS_ALL_ACCESS in Vista+ PSDKs is incompatible with older Windows versions */
#define PROCESS_ALL_ACCESS_NT4 (PROCESS_ALL_ACCESS & ~0xf000)
#define ALIGN_SIZE(size, alignment) (((size) + (
alignment - 1)) & ~((alignment
- 1)))
#define ALIGN_SIZE(size, alignment) (((size) + (
(ULONG_PTR)(alignment) - 1)) & ~(((ULONG_PTR)(alignment)
- 1)))
struct
PROCESS_BASIC_INFORMATION_PRIVATE
{
...
...
@@ -917,8 +917,8 @@ static void test_Loader(void)
ok
(
info
.
BaseAddress
==
hlib
,
"%p != %p
\n
"
,
info
.
BaseAddress
,
hlib
);
ok
(
info
.
AllocationBase
==
hlib
,
"%p != %p
\n
"
,
info
.
AllocationBase
,
hlib
);
ok
(
info
.
AllocationProtect
==
PAGE_EXECUTE_WRITECOPY
,
"%lx != PAGE_EXECUTE_WRITECOPY
\n
"
,
info
.
AllocationProtect
);
ok
(
info
.
RegionSize
==
ALIGN_SIZE
(
nt_header
.
OptionalHeader
.
SizeOfImage
,
page_size
),
"got %Ix != expected %
l
x
\n
"
,
info
.
RegionSize
,
ALIGN_SIZE
(
nt_header
.
OptionalHeader
.
SizeOfImage
,
page_size
));
ok
(
info
.
RegionSize
==
ALIGN_SIZE
(
nt_header
.
OptionalHeader
.
SizeOfImage
,
page_size
),
"got %Ix != expected %x
\n
"
,
info
.
RegionSize
,
(
UINT
)
ALIGN_SIZE
(
nt_header
.
OptionalHeader
.
SizeOfImage
,
page_size
));
ok
(
info
.
State
==
MEM_COMMIT
,
"%lx != MEM_COMMIT
\n
"
,
info
.
State
);
if
(
nt_header
.
OptionalHeader
.
SectionAlignment
<
page_size
)
ok
(
info
.
Protect
==
PAGE_EXECUTE_WRITECOPY
,
"%lx != PAGE_EXECUTE_WRITECOPY
\n
"
,
info
.
Protect
);
...
...
@@ -952,8 +952,8 @@ static void test_Loader(void)
ok
(
info
.
BaseAddress
==
hlib
,
"got %p != expected %p
\n
"
,
info
.
BaseAddress
,
hlib
);
ok
(
info
.
AllocationBase
==
hlib
,
"%p != %p
\n
"
,
info
.
AllocationBase
,
hlib
);
ok
(
info
.
AllocationProtect
==
PAGE_EXECUTE_WRITECOPY
,
"%lx != PAGE_EXECUTE_WRITECOPY
\n
"
,
info
.
AllocationProtect
);
ok
(
info
.
RegionSize
==
ALIGN_SIZE
(
file_size
,
page_size
),
"got %Ix != expected %
l
x
\n
"
,
info
.
RegionSize
,
ALIGN_SIZE
(
file_size
,
page_size
));
ok
(
info
.
RegionSize
==
ALIGN_SIZE
(
file_size
,
page_size
),
"got %Ix != expected %x
\n
"
,
info
.
RegionSize
,
(
UINT
)
ALIGN_SIZE
(
file_size
,
page_size
));
ok
(
info
.
State
==
MEM_COMMIT
,
"%lx != MEM_COMMIT
\n
"
,
info
.
State
);
ok
(
info
.
Protect
==
PAGE_READONLY
,
"%lx != PAGE_READONLY
\n
"
,
info
.
Protect
);
ok
(
info
.
Type
==
SEC_IMAGE
,
"%lx != SEC_IMAGE
\n
"
,
info
.
Type
);
...
...
@@ -978,15 +978,15 @@ static void test_Loader(void)
if
(
nt_header
.
OptionalHeader
.
SectionAlignment
<
page_size
)
{
ok
(
info
.
BaseAddress
==
hlib
,
"got %p != expected %p
\n
"
,
info
.
BaseAddress
,
hlib
);
ok
(
info
.
RegionSize
==
ALIGN_SIZE
(
nt_header
.
OptionalHeader
.
SizeOfImage
,
page_size
),
"got %Ix != expected %
l
x
\n
"
,
info
.
RegionSize
,
ALIGN_SIZE
(
nt_header
.
OptionalHeader
.
SizeOfImage
,
page_size
));
ok
(
info
.
RegionSize
==
ALIGN_SIZE
(
nt_header
.
OptionalHeader
.
SizeOfImage
,
page_size
),
"got %Ix != expected %x
\n
"
,
info
.
RegionSize
,
(
UINT
)
ALIGN_SIZE
(
nt_header
.
OptionalHeader
.
SizeOfImage
,
page_size
));
ok
(
info
.
Protect
==
PAGE_EXECUTE_WRITECOPY
,
"%lx != PAGE_EXECUTE_WRITECOPY
\n
"
,
info
.
Protect
);
}
else
{
ok
(
info
.
BaseAddress
==
(
char
*
)
hlib
+
section
.
VirtualAddress
,
"got %p != expected %p
\n
"
,
info
.
BaseAddress
,
(
char
*
)
hlib
+
section
.
VirtualAddress
);
ok
(
info
.
RegionSize
==
ALIGN_SIZE
(
section
.
Misc
.
VirtualSize
,
page_size
),
"got %Ix != expected %
l
x
\n
"
,
info
.
RegionSize
,
ALIGN_SIZE
(
section
.
Misc
.
VirtualSize
,
page_size
));
ok
(
info
.
RegionSize
==
ALIGN_SIZE
(
section
.
Misc
.
VirtualSize
,
page_size
),
"got %Ix != expected %x
\n
"
,
info
.
RegionSize
,
(
UINT
)
ALIGN_SIZE
(
section
.
Misc
.
VirtualSize
,
page_size
));
ok
(
info
.
Protect
==
PAGE_READONLY
,
"%lx != PAGE_READONLY
\n
"
,
info
.
Protect
);
}
ok
(
info
.
AllocationBase
==
hlib
,
"%p != %p
\n
"
,
info
.
AllocationBase
,
hlib
);
...
...
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