提交 cb54650f 编写于 作者: J Jan Kotas 提交者: GitHub

Fix signature mismatch between managed and unmanaged GetCodeInfo signatures (dotnet/coreclr#24932)

Fixes dotnet/coreclr#24925

Commit migrated from https://github.com/dotnet/coreclr/commit/f49eb0db686c4d647dd9e27b44946c5505bb72f4
上级 81fac6bd
......@@ -673,7 +673,7 @@ internal enum SecurityControlFlags
CanSkipCSEvaluation = 0x8,
}
internal override RuntimeType? GetJitContext(ref int securityControlFlags)
internal override RuntimeType? GetJitContext(out int securityControlFlags)
{
RuntimeType? typeOwner;
......@@ -703,7 +703,7 @@ private static int CalculateNumberOfExceptions(__ExceptionInfo[]? excp)
}
internal override byte[] GetCodeInfo(
ref int stackSize, ref int initLocals, ref int EHCount)
out int stackSize, out int initLocals, out int EHCount)
{
stackSize = m_stackSize;
if (m_exceptionHeader != null && m_exceptionHeader.Length != 0)
......
......@@ -1545,8 +1545,8 @@ internal struct CORINFO_EH_CLAUSE
}
// ILHeader info
internal abstract RuntimeType GetJitContext(ref int securityControlFlags);
internal abstract byte[] GetCodeInfo(ref int stackSize, ref int initLocals, ref int EHCount);
internal abstract RuntimeType GetJitContext(out int securityControlFlags);
internal abstract byte[] GetCodeInfo(out int stackSize, out int initLocals, out int EHCount);
internal abstract byte[] GetLocalsSignature();
internal abstract unsafe void GetEHInfo(int EHNumber, void* exception);
internal abstract byte[] GetRawEHInfo();
......
......@@ -1044,20 +1044,6 @@ void LCGMethodResolver::GetJitContext(SecurityControlFlags * securityControlFlag
} CONTRACTL_END;
GCX_COOP();
GetJitContextCoop(securityControlFlags, typeOwner);
}
void LCGMethodResolver::GetJitContextCoop(SecurityControlFlags * securityControlFlags,
TypeHandle *typeOwner)
{
CONTRACTL {
THROWS;
GC_TRIGGERS;
MODE_COOPERATIVE;
INJECT_FAULT(COMPlusThrowOM(););
PRECONDITION(CheckPointer(securityControlFlags));
PRECONDITION(CheckPointer(typeOwner));
} CONTRACTL_END;
MethodDescCallSite getJitContext(METHOD__RESOLVER__GET_JIT_CONTEXT, m_managedResolver);
......@@ -1098,8 +1084,7 @@ BYTE* LCGMethodResolver::GetCodeInfo(unsigned *pCodeSize, unsigned *pStackSize,
OBJECTREF resolver = ObjectFromHandle(m_managedResolver);
VALIDATEOBJECTREF(resolver); // gc root must be up the stack
DWORD initLocals = 0, EHSize = 0;
unsigned short stackSize = 0;
int32_t stackSize = 0, initLocals = 0, EHSize = 0;
ARG_SLOT args[] =
{
ObjToArgSlot(resolver),
......
......@@ -115,8 +115,6 @@ public:
void FreeCompileTimeState();
void GetJitContext(SecurityControlFlags * securityControlFlags,
TypeHandle * typeOwner);
void GetJitContextCoop(SecurityControlFlags * securityControlFlags,
TypeHandle * typeOwner);
ChunkAllocator* GetJitMetaHeap();
BYTE* GetCodeInfo(unsigned *pCodeSize, unsigned *pStackSize, CorInfoOptions *pOptions, unsigned* pEHSize);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册