We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 893dd07 commit ffbd42fCopy full SHA for ffbd42f
jcl/source/windows/JclDebug.pas
@@ -4933,6 +4933,9 @@ function TJclStackInfoList.NextStackFrame(var StackFrame: PStackFrame; var Stack
4933
StackInfo.CallerAddr := StackFrameCallerAddr - CallInstructionSize
4934
else
4935
StackInfo.CallerAddr := StackFrameCallerAddr;
4936
+ // the stack may be messed up in big projects, avoid overflow in arithmetics
4937
+ if StackFrameCallerFrame < TJclAddr(StackFrame) then
4938
+ Break;
4939
StackInfo.DumpSize := StackFrameCallerFrame - TJclAddr(StackFrame);
4940
StackInfo.ParamSize := (StackInfo.DumpSize - SizeOf(TStackFrame)) div 4;
4941
if PStackFrame(StackFrame^.CallerFrame) = StackFrame then
0 commit comments