mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 09:32:37 +02:00
Patch from Vincent Snijders, sent to fpc-devel
add the same sanity check for the frame pointer in TraceReAllocMem as already is in TraceGetMem. git-svn-id: trunk@7086 -
This commit is contained in:
parent
12504a6aa7
commit
9137533864
@ -628,6 +628,7 @@ var
|
||||
allocsize,
|
||||
movesize,
|
||||
i : ptrint;
|
||||
oldbp,
|
||||
bp : pointer;
|
||||
pl : pdword;
|
||||
pp : pheap_mem_info;
|
||||
@ -745,7 +746,10 @@ begin
|
||||
for i:=1 to tracesize do
|
||||
begin
|
||||
pp^.calls[i]:=get_caller_addr(bp);
|
||||
oldbp:=bp;
|
||||
bp:=get_caller_frame(bp);
|
||||
if (bp<oldbp) or (bp>(StackBottom + StackLength)) then
|
||||
bp:=nil;
|
||||
end;
|
||||
{ regenerate signature }
|
||||
if usecrc then
|
||||
|
Loading…
Reference in New Issue
Block a user