From 91375338649eb818c57ae3b39b9835b87a28c8d7 Mon Sep 17 00:00:00 2001 From: pierre Date: Tue, 10 Apr 2007 22:14:47 +0000 Subject: [PATCH] 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 - --- rtl/inc/heaptrc.pp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rtl/inc/heaptrc.pp b/rtl/inc/heaptrc.pp index 73192a68f8..a912632a69 100644 --- a/rtl/inc/heaptrc.pp +++ b/rtl/inc/heaptrc.pp @@ -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(StackBottom + StackLength)) then + bp:=nil; end; { regenerate signature } if usecrc then