Attached patch add the same sanity check for the frame pointer in TraceReAllocMem as already is in TraceGetMem. It fixed crashes of Lazarus on win64 when compiled with heaptrc.
Tested with fpc 2.1.3. fpc 2.3.1 is currently broken on win64, see mail of 8 April.
Vincent
