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
b65ef71f
Commit
b65ef71f
authored
Nov 16, 2021
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Improve collision handling in SymLoadModuleEx().
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1465c7de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
module.c
dlls/dbghelp/module.c
+12
-3
No files found.
dlls/dbghelp/module.c
View file @
b65ef71f
...
...
@@ -969,6 +969,14 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
/* we have a conflict as the new module cannot be found by its base address
* we need to get rid of one on the two modules
*/
if
(
lstrcmpW
(
module
->
modulename
,
altmodule
->
modulename
)
!=
0
)
{
/* module overlaps an existing but different module... unload new module and return error */
WARN
(
"%ls overlaps %ls
\n
"
,
module
->
modulename
,
altmodule
->
modulename
);
module_remove
(
pcs
,
module
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
/* loading same module at same address... don't change anything */
if
(
module
->
module
.
BaseOfImage
==
altmodule
->
module
.
BaseOfImage
)
{
...
...
@@ -976,9 +984,10 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
SetLastError
(
ERROR_SUCCESS
);
return
0
;
}
module_remove
(
pcs
,
module
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
/* replace old module with new one, which will look like a shift of base address */
WARN
(
"Shift module %ls from %I64x to %I64x
\n
"
,
module
->
modulename
,
altmodule
->
module
.
BaseOfImage
,
module
->
module
.
BaseOfImage
);
module_remove
(
pcs
,
altmodule
);
}
if
((
dbghelp_options
&
SYMOPT_DEFERRED_LOADS
)
==
0
)
...
...
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