Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 89f1279

Browse files
authored
fix pointer in ILCodeVersionNode so it uses PTR_COR_ILMETHOD instead of COR_IL_METHOD *, which was causing a crash in the DAC (#16003) (#16032)
1 parent 40970bc commit 89f1279

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/vm/codeversion.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,11 @@ ILCodeVersionNode::ILCodeVersionNode() :
518518
m_rejitId(0),
519519
m_pNextILVersionNode(dac_cast<PTR_ILCodeVersionNode>(nullptr)),
520520
m_rejitState(ILCodeVersion::kStateRequested),
521-
m_pIL(dac_cast<PTR_COR_ILMETHOD>(nullptr)),
521+
m_pIL(),
522522
m_jitFlags(0)
523-
{}
523+
{
524+
m_pIL.Store(dac_cast<PTR_COR_ILMETHOD>(nullptr));
525+
}
524526

525527
#ifndef DACCESS_COMPILE
526528
ILCodeVersionNode::ILCodeVersionNode(Module* pModule, mdMethodDef methodDef, ReJITID id) :

src/vm/codeversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ class ILCodeVersionNode
340340
ReJITID m_rejitId;
341341
PTR_ILCodeVersionNode m_pNextILVersionNode;
342342
Volatile<ILCodeVersion::RejitFlags> m_rejitState;
343-
VolatilePtr<COR_ILMETHOD> m_pIL;
343+
VolatilePtr<COR_ILMETHOD, PTR_COR_ILMETHOD> m_pIL;
344344
Volatile<DWORD> m_jitFlags;
345345
InstrumentedILOffsetMapping m_instrumentedILMap;
346346
};

0 commit comments

Comments
 (0)