Fix incorrect sizeof for winContext
authorAleksei Vereshchagin <avereschagin@dev.rtsoft.ru>
Mon, 11 Dec 2017 17:26:22 +0000 (20:26 +0300)
committerAleksei Vereshchagin <avereschagin@dev.rtsoft.ru>
Mon, 11 Dec 2017 17:26:22 +0000 (20:26 +0300)
src/trace/executiontrace.cpp

index f2836c3..f1acf1e 100644 (file)
@@ -223,7 +223,7 @@ UINT_PTR ExecutionTrace::GetCurrentManagedIP(
     Snapshot data = {funcInfo.id, 0};
     m_info.v2()->DoStackSnapshot(thrInfo.id, Snapshot::Callback,
         COR_PRF_SNAPSHOT_DEFAULT, &data,
-        reinterpret_cast<BYTE*>(winContext), sizeof(winContext));
+        reinterpret_cast<BYTE*>(winContext), sizeof(*winContext));
 
     return data.pc;
 }
@@ -304,7 +304,7 @@ void ExecutionTrace::RestoreManagedIP(
     HRESULT hr;
     hr = m_info.v2()->DoStackSnapshot(thrInfo.id, Snapshot::Callback,
         COR_PRF_SNAPSHOT_DEFAULT, &data,
-        reinterpret_cast<BYTE*>(winContext), sizeof(winContext));
+        reinterpret_cast<BYTE*>(winContext), sizeof(*winContext));
     if (FAILED(hr) && hr != CORPROF_E_STACKSNAPSHOT_ABORTED)
     {
         thrInfo.eventChannel.ChIP(0);