summaryrefslogtreecommitdiff
path: root/src/vm
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm')
-rw-r--r--src/vm/CMakeLists.txt4
-rw-r--r--src/vm/eventpipeblock.cpp6
-rw-r--r--src/vm/eventtrace.cpp3
3 files changed, 13 insertions, 0 deletions
diff --git a/src/vm/CMakeLists.txt b/src/vm/CMakeLists.txt
index c90c955003..10f8d340aa 100644
--- a/src/vm/CMakeLists.txt
+++ b/src/vm/CMakeLists.txt
@@ -38,6 +38,10 @@ if(FEATURE_JIT_PITCHING)
add_definitions(-DFEATURE_JIT_PITCHING)
endif(FEATURE_JIT_PITCHING)
+if(FEATURE_EVENT_TRACE AND NOT _TARGET_64BIT_)
+ add_definitions(-DFEATURE_LARGEADDRESS_SUPPORT)
+endif()
+
set(VM_SOURCES_DAC_AND_WKS_COMMON
appdomain.cpp
array.cpp
diff --git a/src/vm/eventpipeblock.cpp b/src/vm/eventpipeblock.cpp
index fb9d6c721e..d510ec8adf 100644
--- a/src/vm/eventpipeblock.cpp
+++ b/src/vm/eventpipeblock.cpp
@@ -457,6 +457,12 @@ bool EventPipeStackBlock::WriteStack(DWORD stackId, StackContents* pStack)
if (stackSize > 0)
{
memcpy(m_pWritePointer, pStack->GetPointer(), stackSize);
+#ifdef FEATURE_LARGEADDRESS_SUPPORT
+ for (int i = 0; i < stackSize / sizeof(UINT_PTR); i++)
+ {
+ ((UINT_PTR*)m_pWritePointer)[i] &= INT_MAX;
+ }
+#endif // FEATURE_LARGEADDRESS_SUPPORT
m_pWritePointer += stackSize;
}
diff --git a/src/vm/eventtrace.cpp b/src/vm/eventtrace.cpp
index 36235d605b..6ef769dc94 100644
--- a/src/vm/eventtrace.cpp
+++ b/src/vm/eventtrace.cpp
@@ -6426,6 +6426,9 @@ VOID ETW::MethodLog::SendMethodEvent(MethodDesc *pMethodDesc, DWORD dwEventOptio
codeInfo.GetMethodRegionInfo(&methodRegionInfo);
ullMethodStartAddress = (ULONGLONG)methodRegionInfo.hotStartAddress;
+#ifdef FEATURE_LARGEADDRESS_SUPPORT
+ ullMethodStartAddress &= INT_MAX;
+#endif
ulMethodSize = (ULONG)methodRegionInfo.hotSize;
ullModuleID = (ULONGLONG)(TADDR) pModule;