Fix GC Hole by using SetAt on the PTRARRAY for the Assembly objects
authorJohn Salem <josalem@microsoft.com>
Wed, 20 Feb 2019 20:22:24 +0000 (12:22 -0800)
committerJohn Salem <josalem@microsoft.com>
Wed, 20 Feb 2019 20:22:24 +0000 (12:22 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/a63e6487936b54dd707636d8b8210dfd956f37d7

src/coreclr/src/vm/debugdebugger.cpp

index a839340..a5cc9bc 100644 (file)
@@ -519,8 +519,8 @@ FCIMPL4(void, DebugStackTrace::GetStackFramesInternal,
             pILI4[iNumValidFrames] = data.pElements[i].dwILOffset;
 
             // Assembly
-            OBJECTREF *pAssemblyArray = pStackFrameHelper->rgAssembly->GetDataPtr();
-            pAssemblyArray[iNumValidFrames] = pFunc->GetAssembly()->GetDomainAssembly()->GetExposedAssemblyObject();
+            OBJECTREF pAssembly = pFunc->GetAssembly()->GetDomainAssembly()->GetExposedAssemblyObject(); 
+            pStackFrameHelper->rgAssembly->SetAt(iNumValidFrames, pAssembly);
 
             if (data.fDoWeHaveAnyFramesFromForeignStackTrace)
             {