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
cb959648
Commit
cb959648
authored
Jan 17, 2008
by
Eric van Beurden
Committed by
Alexandre Julliard
Jan 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Prevent huge minidumps by ensuring the memory range is clamped.
parent
69299829
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
6 deletions
+36
-6
minidump.c
dlls/dbghelp/minidump.c
+36
-6
No files found.
dlls/dbghelp/minidump.c
View file @
cb959648
...
...
@@ -119,20 +119,50 @@ static void fetch_thread_stack(struct dump_context* dc, const void* teb_addr,
{
#ifdef __i386__
/* limiting the stack dumping to the size actually used */
if
(
ctx
->
Esp
)
mmd
->
StartOfMemoryRange
=
(
ctx
->
Esp
-
4
);
if
(
ctx
->
Esp
){
/* make sure ESP is within the established range of the stack. It could have
been clobbered by whatever caused the original exception. */
if
(
ctx
->
Esp
-
4
<
(
ULONG_PTR
)
tib
.
StackLimit
||
ctx
->
Esp
-
4
>
(
ULONG_PTR
)
tib
.
StackBase
)
mmd
->
StartOfMemoryRange
=
(
ULONG_PTR
)
tib
.
StackLimit
;
else
mmd
->
StartOfMemoryRange
=
(
ctx
->
Esp
-
4
);
}
else
mmd
->
StartOfMemoryRange
=
(
ULONG_PTR
)
tib
.
StackLimit
;
#elif defined(__powerpc__)
if
(
ctx
->
Iar
)
mmd
->
StartOfMemoryRange
=
ctx
->
Iar
-
4
;
if
(
ctx
->
Iar
){
/* make sure IAR is within the established range of the stack. It could have
been clobbered by whatever caused the original exception. */
if
(
ctx
->
Iar
-
4
<
(
ULONG_PTR
)
tib
.
StackLimit
||
ctx
->
Iar
-
4
>
(
ULONG_PTR
)
tib
.
StackBase
)
mmd
->
StartOfMemoryRange
=
(
ULONG_PTR
)
tib
.
StackLimit
;
else
mmd
->
StartOfMemoryRange
=
(
ctx
->
Iar
-
4
);
}
else
mmd
->
StartOfMemoryRange
=
(
ULONG_PTR
)
tib
.
StackLimit
;
#elif defined(__x86_64__)
if
(
ctx
->
Rsp
)
mmd
->
StartOfMemoryRange
=
(
ctx
->
Rsp
-
8
);
if
(
ctx
->
Rsp
){
/* make sure RSP is within the established range of the stack. It could have
been clobbered by whatever caused the original exception. */
if
(
ctx
->
Rsp
-
8
<
(
ULONG_PTR
)
tib
.
StackLimit
||
ctx
->
Rsp
-
8
>
(
ULONG_PTR
)
tib
.
StackBase
)
mmd
->
StartOfMemoryRange
=
(
ULONG_PTR
)
tib
.
StackLimit
;
else
mmd
->
StartOfMemoryRange
=
(
ctx
->
Rsp
-
8
);
}
else
mmd
->
StartOfMemoryRange
=
(
ULONG_PTR
)
tib
.
StackLimit
;
#else
#error unsupported CPU
#endif
...
...
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