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
e5c55c5a
Commit
e5c55c5a
authored
Jun 24, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add a test for VirtualAlloc called on a mapped PE section.
parent
de03abd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
loader.c
dlls/kernel32/tests/loader.c
+21
-0
No files found.
dlls/kernel32/tests/loader.c
View file @
e5c55c5a
...
...
@@ -374,6 +374,7 @@ static void test_Loader(void)
if
(
hlib
)
{
MEMORY_BASIC_INFORMATION
info
;
void
*
ptr
;
ok
(
td
[
i
].
errors
[
0
]
==
ERROR_SUCCESS
,
"%d: should have failed
\n
"
,
i
);
...
...
@@ -394,6 +395,15 @@ static void test_Loader(void)
ok
(
info
.
Type
==
SEC_IMAGE
,
"%d: %x != SEC_IMAGE
\n
"
,
i
,
info
.
Type
);
SetLastError
(
0xdeadbeef
);
ptr
=
VirtualAlloc
(
hlib
,
si
.
dwPageSize
,
MEM_COMMIT
,
info
.
Protect
);
/* FIXME: Remove once Wine is fixed */
if
(
ptr
)
todo_wine
ok
(
!
ptr
,
"%d: VirtualAlloc should fail
\n
"
,
i
);
else
ok
(
!
ptr
,
"%d: VirtualAlloc should fail
\n
"
,
i
);
todo_wine
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"%d: expected ERROR_ACCESS_DENIED, got %d
\n
"
,
i
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
size
=
VirtualQuery
((
char
*
)
hlib
+
info
.
RegionSize
,
&
info
,
sizeof
(
info
));
ok
(
size
==
sizeof
(
info
),
"%d: VirtualQuery error %d
\n
"
,
i
,
GetLastError
());
...
...
@@ -471,6 +481,17 @@ static void test_Loader(void)
size
=
ALIGN_SIZE
((
ULONG_PTR
)
start
,
si
.
dwPageSize
)
-
(
ULONG_PTR
)
start
;
ok
(
memcmp
(
start
,
filler
,
size
),
"%d: alignment should not be cleared
\n
"
,
i
);
}
SetLastError
(
0xdeadbeef
);
ptr
=
VirtualAlloc
((
char
*
)
hlib
+
section
.
VirtualAddress
,
si
.
dwPageSize
,
MEM_COMMIT
,
info
.
Protect
);
/* FIXME: Remove once Wine is fixed */
if
(
ptr
)
todo_wine
ok
(
!
ptr
,
"%d: VirtualAlloc should fail
\n
"
,
i
);
else
ok
(
!
ptr
,
"%d: VirtualAlloc should fail
\n
"
,
i
);
todo_wine
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
||
GetLastError
()
==
ERROR_INVALID_ADDRESS
,
"%d: expected ERROR_ACCESS_DENIED, got %d
\n
"
,
i
,
GetLastError
());
}
SetLastError
(
0xdeadbeef
);
...
...
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