fix: correct getting callstack in segfault handler on Windows

get context record at the very beginning of function

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-11-13 12:23:18 +00:00
committed by Compute-Runtime-Automation
parent ef64de3f10
commit 5b75b1d5a9

View File

@@ -57,6 +57,7 @@ void SehException::getCallStack(unsigned int code, struct _EXCEPTION_POINTERS *e
DWORD machine = 0;
HANDLE hProcess = GetCurrentProcess();
HANDLE hThread = GetCurrentThread();
auto contextRecord = *ep->ContextRecord;
SYSTEM_INFO systemInfo;
GetSystemInfo(&systemInfo);
@@ -110,7 +111,6 @@ void SehException::getCallStack(unsigned int code, struct _EXCEPTION_POINTERS *e
#endif
auto contextRecord = *ep->ContextRecord;
while (callstackCounter < maxCallstackDepth) {
symbol->Name[255] = '\0';