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:
pierre 2007-04-10 22:14:47 +00:00
parent 12504a6aa7
commit 9137533864

View File

@ -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