Skip to content

Commit be5f1fe

Browse files
committed
A fix for IsDynamic() case.
1 parent 23945fb commit be5f1fe

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/coreclr/vm/assembly.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void Assembly::Init(AllocMemTracker *pamTracker, LoaderAllocator *pLoaderAllocat
191191

192192
PEAssembly* pPEAssembly = GetManifestFile();
193193

194-
// Module::Create will initialize R2R support
194+
// "Module::Create" will initialize R2R support, if there is an R2R header.
195195
// make sure the PE is loaded or R2R will be disabled.
196196
pPEAssembly->EnsureLoaded();
197197

@@ -214,7 +214,7 @@ void Assembly::Init(AllocMemTracker *pamTracker, LoaderAllocator *pLoaderAllocat
214214
// loading it entirely.
215215
//CacheFriendAssemblyInfo();
216216

217-
if (IsCollectible())
217+
if (IsCollectible() && !pPEAssembly->IsDynamic())
218218
{
219219
COUNT_T size;
220220
BYTE* start = (BYTE*)pPEAssembly->GetLoadedImageContents(&size);

src/coreclr/vm/peimagelayout.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,6 @@ ConvertedImageLayout::ConvertedImageLayout(FlatImageLayout* source)
402402
bool relocationMustWriteCopy = false;
403403
void* loadedImage = NULL;
404404

405-
// TODO: VS deal with LOG things.
406405
LOG((LF_LOADER, LL_INFO100, "PEImage: Opening manually mapped stream\n"));
407406

408407
#ifdef TARGET_WINDOWS

0 commit comments

Comments
 (0)