pleriche / FastMM4

A memory manager for Delphi and C++ Builder with powerful debugging facilities
447 stars 158 forks source link

access violation in GetFrameBasedStackTrace #61

Open sajtran opened 6 years ago

sajtran commented 6 years ago

Hi I replaced with

procedure GetFrameBasedStackTrace(AReturnAddresses: PNativeUInt;
  AMaxDepth, ASkipFrames: Cardinal);
var
  LStackTop, LStackBottom, LCurrentFrame: NativeUInt;
begin
  {Get the call stack top and current bottom}
  GetStackRange(LStackTop, LStackBottom);
  Dec(LStackTop, 2 * SizeOf(Pointer) );
  {Get the current frame start}
  LCurrentFrame := LStackBottom;
  {Fill the call stack}
  while (AMaxDepth > 0)
    and (LCurrentFrame >= LStackBottom)
    and (LCurrentFrame <= LStackTop) do
  begin

MemTest.zip

sajtran commented 6 years ago

win32 subsystem on Windows 10 x64