Fix #14418 (#14419)
authorNoah Falk <noahfalk@users.noreply.github.com>
Thu, 12 Oct 2017 21:54:31 +0000 (14:54 -0700)
committerGitHub <noreply@github.com>
Thu, 12 Oct 2017 21:54:31 +0000 (14:54 -0700)
Adds the appropriate handling of the default ILCodeVersion in DacDbiInterfaceImpl::GetILCodeVersionNode

src/debug/daccess/dacdbiimpl.cpp

index 38f52ad..4f15297 100644 (file)
@@ -7221,7 +7221,16 @@ HRESULT DacDbiInterfaceImpl::GetILCodeVersionNode(VMPTR_NativeCodeVersionNode vm
         return E_INVALIDARG;
 #ifdef FEATURE_REJIT
     NativeCodeVersionNode* pNativeCodeVersionNode = vmNativeCodeVersionNode.GetDacPtr();
-    pVmILCodeVersionNode->SetDacTargetPtr(PTR_TO_TADDR(pNativeCodeVersionNode->GetILCodeVersion().AsNode()));
+    ILCodeVersion ilCodeVersion = pNativeCodeVersionNode->GetILCodeVersion();
+    if (ilCodeVersion.IsDefaultVersion())
+    {
+        pVmILCodeVersionNode->SetDacTargetPtr(0);
+    }
+    else
+    {
+        pVmILCodeVersionNode->SetDacTargetPtr(PTR_TO_TADDR(ilCodeVersion.AsNode()));
+    }
+    
 #else
     _ASSERTE(!"You shouldn't be calling this - rejit is not supported in this build");
     pVmILCodeVersionNode->SetDacTargetPtr(0);