Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/callstack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,14 +715,14 @@ VOID FastCallStack::getStackTrace (UINT32 maxdepth, const context_t& context)
framePointer = (UINT_PTR*)*framePointer;
}
#elif defined(_M_X64)*/
UINT32 maxframes = min(62, maxdepth + 10);
UINT32 maxframes = (62 < maxdepth + 10) ? 62 : maxdepth + 10;
UINT_PTR* myFrames = new UINT_PTR[maxframes];
ZeroMemory(myFrames, sizeof(UINT_PTR) * maxframes);
ULONG BackTraceHash;
maxframes = RtlCaptureStackBackTrace(0, maxframes, reinterpret_cast<PVOID*>(myFrames), &BackTraceHash);
m_hashValue = BackTraceHash;
UINT32 startIndex = 0;

// Find the frame matching context.fp to skip VLD internal frames
while (count < maxframes) {
if (myFrames[count] == 0)
Expand All @@ -731,7 +731,7 @@ VOID FastCallStack::getStackTrace (UINT32 maxdepth, const context_t& context)
startIndex = count;
count++;
}

count = startIndex;
while (count < maxframes) {
if (myFrames[count] == 0)
Expand Down