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
41c7652b
Commit
41c7652b
authored
Nov 02, 2021
by
Paul Gofman
Committed by
Alexandre Julliard
Nov 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Allocate DDAG node for module.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ef6e33f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
module.c
dlls/kernel32/tests/module.c
+3
-3
loader.c
dlls/ntdll/loader.c
+14
-0
No files found.
dlls/kernel32/tests/module.c
View file @
41c7652b
...
...
@@ -1358,7 +1358,7 @@ static void test_ddag_node(void)
if
(
!
(
node
=
mod
->
DdagNode
))
{
skip
(
"DdagNode is NULL, skipping tests.
\n
"
);
win_
skip
(
"DdagNode is NULL, skipping tests.
\n
"
);
return
;
}
...
...
@@ -1376,11 +1376,11 @@ static void test_ddag_node(void)
ok
(
!
node
->
IncomingDependencies
.
Tail
,
"Expected empty incoming dependencies list.
\n
"
);
/* node->Dependencies.Tail is NULL on Windows 10 1507-1607 32 bit test, maybe due to broken structure layout. */
ok
(
!!
node
->
Dependencies
.
Tail
||
broken
(
sizeof
(
void
*
)
==
4
&&
!
node
->
Dependencies
.
Tail
),
todo_wine
ok
(
!!
node
->
Dependencies
.
Tail
||
broken
(
sizeof
(
void
*
)
==
4
&&
!
node
->
Dependencies
.
Tail
),
"Expected nonempty dependencies list.
\n
"
);
if
(
!
node
->
Dependencies
.
Tail
)
{
win_
skip
(
"Empty dependencies list.
\n
"
);
skip
(
"Empty dependencies list.
\n
"
);
return
;
}
ok
(
node
->
LoadCount
==
-
1
,
"Got unexpected LoadCount %d.
\n
"
,
node
->
LoadCount
);
...
...
dlls/ntdll/loader.c
View file @
41c7652b
...
...
@@ -1232,6 +1232,16 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
RtlFreeHeap
(
GetProcessHeap
(),
0
,
wm
);
return
NULL
;
}
if
(
!
(
wm
->
ldr
.
DdagNode
=
RtlAllocateHeap
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
wm
->
ldr
.
DdagNode
)
)))
{
RtlFreeHeap
(
GetProcessHeap
(),
0
,
buffer
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
wm
);
return
NULL
;
}
InitializeListHead
(
&
wm
->
ldr
.
DdagNode
->
Modules
);
InsertTailList
(
&
wm
->
ldr
.
DdagNode
->
Modules
,
&
wm
->
ldr
.
NodeModuleLink
);
memcpy
(
buffer
,
nt_name
->
Buffer
+
4
/* \??\ prefix */
,
nt_name
->
Length
-
4
*
sizeof
(
WCHAR
)
);
buffer
[
nt_name
->
Length
/
sizeof
(
WCHAR
)
-
4
]
=
0
;
if
((
p
=
wcsrchr
(
buffer
,
'\\'
)))
p
++
;
...
...
@@ -3518,6 +3528,10 @@ static void free_modref( WINE_MODREF *wm )
if
(
wm
->
ldr
.
InInitializationOrderLinks
.
Flink
)
RemoveEntryList
(
&
wm
->
ldr
.
InInitializationOrderLinks
);
RemoveEntryList
(
&
wm
->
ldr
.
NodeModuleLink
);
if
(
IsListEmpty
(
&
wm
->
ldr
.
DdagNode
->
Modules
))
RtlFreeHeap
(
GetProcessHeap
(),
0
,
wm
->
ldr
.
DdagNode
);
TRACE
(
" unloading %s
\n
"
,
debugstr_w
(
wm
->
ldr
.
FullDllName
.
Buffer
));
if
(
!
TRACE_ON
(
module
))
TRACE_
(
loaddll
)(
"Unloaded module %s : %s
\n
"
,
...
...
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