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
Peter
_______________________________________________ fpc-devel maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-devel
