[fpc-devel]heaptrc: web bug 2632

Peter Vreman peter at freepascal.org
Thu Sep 11 17:55:32 CEST 2003

>I added an extra local variable to hold the previous bp and the loop now
>looks like this:
>   bp:=get_caller_frame(get_frame);
>   for i:=1 to tracesize do
>    begin
>      pheap_mem_info(p)^.calls[i]:=get_caller_addr(bp);
>      oldbp := bp;
>      bp:=get_caller_frame(bp);
>      if (bp<oldbp) then
>        bp:= 0;
>    end;
>I recompiled the rtl and run several test programs and the programs
>didn't crash anymore.
>The check on the frame pointer could be more sophisticated if I knew a
>way to find out what the top of the stack is, so I could check if the
>frame pointer is in stack.

Thanks, i've applied the patch


More information about the fpc-devel mailing list