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
0f500eac
Commit
0f500eac
authored
Sep 20, 2011
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Add a test to show that uninitialized sections are not special…
kernel32: Add a test to show that uninitialized sections are not special regarding protection flags.
parent
229d4e21
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
loader.c
dlls/kernel32/tests/loader.c
+24
-1
No files found.
dlls/kernel32/tests/loader.c
View file @
0f500eac
...
...
@@ -567,7 +567,25 @@ static void test_section_access(void)
{
IMAGE_SCN_MEM_READ
|
IMAGE_SCN_MEM_WRITE
,
PAGE_WRITECOPY
},
{
IMAGE_SCN_MEM_READ
|
IMAGE_SCN_MEM_EXECUTE
,
PAGE_EXECUTE_READ
},
{
IMAGE_SCN_MEM_WRITE
|
IMAGE_SCN_MEM_EXECUTE
,
PAGE_EXECUTE_WRITECOPY
},
{
IMAGE_SCN_MEM_READ
|
IMAGE_SCN_MEM_WRITE
|
IMAGE_SCN_MEM_EXECUTE
,
PAGE_EXECUTE_WRITECOPY
}
{
IMAGE_SCN_MEM_READ
|
IMAGE_SCN_MEM_WRITE
|
IMAGE_SCN_MEM_EXECUTE
,
PAGE_EXECUTE_WRITECOPY
},
{
IMAGE_SCN_CNT_INITIALIZED_DATA
,
PAGE_NOACCESS
},
{
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
,
PAGE_READONLY
},
{
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_WRITE
,
PAGE_WRITECOPY
},
{
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_EXECUTE
,
PAGE_EXECUTE
},
{
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
|
IMAGE_SCN_MEM_WRITE
,
PAGE_WRITECOPY
},
{
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
|
IMAGE_SCN_MEM_EXECUTE
,
PAGE_EXECUTE_READ
},
{
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_WRITE
|
IMAGE_SCN_MEM_EXECUTE
,
PAGE_EXECUTE_WRITECOPY
},
{
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
|
IMAGE_SCN_MEM_WRITE
|
IMAGE_SCN_MEM_EXECUTE
,
PAGE_EXECUTE_WRITECOPY
},
{
IMAGE_SCN_CNT_UNINITIALIZED_DATA
,
PAGE_NOACCESS
},
{
IMAGE_SCN_CNT_UNINITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
,
PAGE_READONLY
},
{
IMAGE_SCN_CNT_UNINITIALIZED_DATA
|
IMAGE_SCN_MEM_WRITE
,
PAGE_WRITECOPY
},
{
IMAGE_SCN_CNT_UNINITIALIZED_DATA
|
IMAGE_SCN_MEM_EXECUTE
,
PAGE_EXECUTE
},
{
IMAGE_SCN_CNT_UNINITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
|
IMAGE_SCN_MEM_WRITE
,
PAGE_WRITECOPY
},
{
IMAGE_SCN_CNT_UNINITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
|
IMAGE_SCN_MEM_EXECUTE
,
PAGE_EXECUTE_READ
},
{
IMAGE_SCN_CNT_UNINITIALIZED_DATA
|
IMAGE_SCN_MEM_WRITE
|
IMAGE_SCN_MEM_EXECUTE
,
PAGE_EXECUTE_WRITECOPY
},
{
IMAGE_SCN_CNT_UNINITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
|
IMAGE_SCN_MEM_WRITE
|
IMAGE_SCN_MEM_EXECUTE
,
PAGE_EXECUTE_WRITECOPY
}
};
static
const
char
filler
[
0x1000
];
static
const
char
section_data
[
0x10
]
=
"section data"
;
...
...
@@ -651,6 +669,11 @@ static void test_section_access(void)
"%d: VirtualQuery error %d
\n
"
,
i
,
GetLastError
());
ok
(
info
.
BaseAddress
==
(
char
*
)
hlib
+
section
.
VirtualAddress
,
"%d: got %p != expected %p
\n
"
,
i
,
info
.
BaseAddress
,
(
char
*
)
hlib
+
section
.
VirtualAddress
);
ok
(
info
.
RegionSize
==
si
.
dwPageSize
,
"%d: got %#lx != expected %#x
\n
"
,
i
,
info
.
RegionSize
,
si
.
dwPageSize
);
/* FIXME: remove the condition below once Wine is fixed */
if
((
td
[
i
].
scn_file_access
&
IMAGE_SCN_MEM_WRITE
)
&&
(
td
[
i
].
scn_file_access
&
IMAGE_SCN_CNT_UNINITIALIZED_DATA
))
todo_wine
ok
(
info
.
Protect
==
td
[
i
].
scn_page_access
,
"%d: got %#x != expected %#x
\n
"
,
i
,
info
.
Protect
,
td
[
i
].
scn_page_access
);
else
ok
(
info
.
Protect
==
td
[
i
].
scn_page_access
,
"%d: got %#x != expected %#x
\n
"
,
i
,
info
.
Protect
,
td
[
i
].
scn_page_access
);
ok
(
info
.
AllocationBase
==
hlib
,
"%d: %p != %p
\n
"
,
i
,
info
.
AllocationBase
,
hlib
);
ok
(
info
.
AllocationProtect
==
PAGE_EXECUTE_WRITECOPY
,
"%d: %#x != PAGE_EXECUTE_WRITECOPY
\n
"
,
i
,
info
.
AllocationProtect
);
...
...
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