summaryrefslogtreecommitdiff
path: root/src/vm
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm')
-rw-r--r--src/vm/amd64/cgenamd64.cpp2
-rw-r--r--src/vm/amd64/cgencpu.h2
-rw-r--r--src/vm/amd64/excepamd64.cpp6
-rw-r--r--src/vm/amd64/excepcpu.h4
-rw-r--r--src/vm/clsload.hpp8
-rw-r--r--src/vm/codeman.cpp28
-rw-r--r--src/vm/codeman.h10
-rw-r--r--src/vm/exceptionhandling.cpp4
-rw-r--r--src/vm/i386/stublinkerx86.cpp2
-rw-r--r--src/vm/jithelpers.cpp8
-rw-r--r--src/vm/jitinterface.cpp19
-rw-r--r--src/vm/jitinterface.h6
-rw-r--r--src/vm/nativeformatreader.h6
-rw-r--r--src/vm/readytoruninfo.cpp6
-rw-r--r--src/vm/rtlfunctions.h4
-rw-r--r--src/vm/stackwalk.cpp8
-rw-r--r--src/vm/stublink.cpp4
-rw-r--r--src/vm/stublink.h6
-rw-r--r--src/vm/threads.h2
-rw-r--r--src/vm/win32threadpool.cpp2
20 files changed, 84 insertions, 53 deletions
diff --git a/src/vm/amd64/cgenamd64.cpp b/src/vm/amd64/cgenamd64.cpp
index 9ba89ae8cf..a83c166474 100644
--- a/src/vm/amd64/cgenamd64.cpp
+++ b/src/vm/amd64/cgenamd64.cpp
@@ -799,7 +799,7 @@ BOOL DoesSlotCallPrestub(PCODE pCode)
// we use this function to get at these offsets
//
DWORD GetOffsetAtEndOfFunction(ULONGLONG uImageBase,
- PRUNTIME_FUNCTION pFunctionEntry,
+ PT_RUNTIME_FUNCTION pFunctionEntry,
int offsetNum /* = 1*/)
{
CONTRACTL
diff --git a/src/vm/amd64/cgencpu.h b/src/vm/amd64/cgencpu.h
index c66692467a..3d99b6f7f0 100644
--- a/src/vm/amd64/cgencpu.h
+++ b/src/vm/amd64/cgencpu.h
@@ -507,7 +507,7 @@ struct HijackArgs
#ifndef DACCESS_COMPILE
DWORD GetOffsetAtEndOfFunction(ULONGLONG uImageBase,
- PRUNTIME_FUNCTION pFunctionEntry,
+ PT_RUNTIME_FUNCTION pFunctionEntry,
int offsetNum = 1);
#endif // DACCESS_COMPILE
diff --git a/src/vm/amd64/excepamd64.cpp b/src/vm/amd64/excepamd64.cpp
index cf8ed14a8b..2fc553a987 100644
--- a/src/vm/amd64/excepamd64.cpp
+++ b/src/vm/amd64/excepamd64.cpp
@@ -147,7 +147,7 @@ RtlVirtualUnwind (
IN ULONG HandlerType,
IN ULONG64 ImageBase,
IN ULONG64 ControlPc,
- IN PRUNTIME_FUNCTION FunctionEntry,
+ IN PT_RUNTIME_FUNCTION FunctionEntry,
IN OUT PCONTEXT ContextRecord,
OUT PVOID *HandlerData,
OUT PULONG64 EstablisherFrame,
@@ -183,7 +183,7 @@ RtlVirtualUnwind_Worker (
IN ULONG HandlerType,
IN ULONG64 ImageBase,
IN ULONG64 ControlPc,
- IN PRUNTIME_FUNCTION FunctionEntry,
+ IN PT_RUNTIME_FUNCTION FunctionEntry,
IN OUT PCONTEXT ContextRecord,
OUT PVOID *HandlerData,
OUT PULONG64 EstablisherFrame,
@@ -430,7 +430,7 @@ RtlVirtualUnwind_Worker (
// as well as a single byte representation of the Function code so that tests to make sure
// that we're out of the prologue will not fail.
- RUNTIME_FUNCTION FakeFunctionEntry;
+ T_RUNTIME_FUNCTION FakeFunctionEntry;
//
// The buffer contains 4 sections
diff --git a/src/vm/amd64/excepcpu.h b/src/vm/amd64/excepcpu.h
index 5e96dbd1c5..150416608b 100644
--- a/src/vm/amd64/excepcpu.h
+++ b/src/vm/amd64/excepcpu.h
@@ -65,7 +65,7 @@ RtlVirtualUnwind (
IN ULONG HandlerType,
IN ULONG64 ImageBase,
IN ULONG64 ControlPc,
- IN PRUNTIME_FUNCTION FunctionEntry,
+ IN PT_RUNTIME_FUNCTION FunctionEntry,
IN OUT PCONTEXT ContextRecord,
OUT PVOID *HandlerData,
OUT PULONG64 EstablisherFrame,
@@ -77,7 +77,7 @@ RtlVirtualUnwind_Worker (
IN ULONG HandlerType,
IN ULONG64 ImageBase,
IN ULONG64 ControlPc,
- IN PRUNTIME_FUNCTION FunctionEntry,
+ IN PT_RUNTIME_FUNCTION FunctionEntry,
IN OUT PCONTEXT ContextRecord,
OUT PVOID *HandlerData,
OUT PULONG64 EstablisherFrame,
diff --git a/src/vm/clsload.hpp b/src/vm/clsload.hpp
index ca561a8049..e2705ae2e4 100644
--- a/src/vm/clsload.hpp
+++ b/src/vm/clsload.hpp
@@ -87,18 +87,24 @@ public:
const HashedTypeEntry& SetClassHashBasedEntryValue(EEClassHashEntry_t * pClassHashEntry)
{
+ LIMITED_METHOD_CONTRACT;
+
m_EntryType = EntryType::IsHashedClassEntry;
m_pClassHashEntry = dac_cast<PTR_EEClassHashEntry>(pClassHashEntry);
return *this;
}
EEClassHashEntry_t * GetClassHashBasedEntryValue()
{
+ LIMITED_METHOD_CONTRACT;
+
_ASSERT(m_EntryType == EntryType::IsHashedClassEntry);
return m_pClassHashEntry;
}
const HashedTypeEntry& SetTokenBasedEntryValue(mdTypeDef typeToken, Module * pModule)
{
+ LIMITED_METHOD_CONTRACT;
+
m_EntryType = EntryType::IsHashedTokenEntry;
m_TokenAndModulePair.m_TypeToken = typeToken;
m_TokenAndModulePair.m_pModule = pModule;
@@ -106,6 +112,8 @@ public:
}
const TokenTypeEntry& GetTokenBasedEntryValue()
{
+ LIMITED_METHOD_CONTRACT;
+
_ASSERT(m_EntryType == EntryType::IsHashedTokenEntry);
return m_TokenAndModulePair;
}
diff --git a/src/vm/codeman.cpp b/src/vm/codeman.cpp
index fec74bb6ae..e625bca06c 100644
--- a/src/vm/codeman.cpp
+++ b/src/vm/codeman.cpp
@@ -73,7 +73,7 @@ CrstStatic ExecutionManager::m_RangeCrst;
// Support for new style unwind information (to allow OS to stack crawl JIT compiled code).
typedef NTSTATUS (WINAPI* RtlAddGrowableFunctionTableFnPtr) (
- PVOID *DynamicTable, RUNTIME_FUNCTION* FunctionTable, ULONG EntryCount,
+ PVOID *DynamicTable, PRUNTIME_FUNCTION FunctionTable, ULONG EntryCount,
ULONG MaximumEntryCount, ULONG_PTR rangeStart, ULONG_PTR rangeEnd);
typedef VOID (WINAPI* RtlGrowFunctionTableFnPtr) (PVOID DynamicTable, ULONG NewEntryCount);
typedef VOID (WINAPI* RtlDeleteGrowableFunctionTableFnPtr) (PVOID DynamicTable);
@@ -92,7 +92,7 @@ Volatile<bool> UnwindInfoTable::s_publishingActive = false;
#if _DEBUG
// Fake functions on Win7 checked build to excercize the code paths, they are no-ops
NTSTATUS WINAPI FakeRtlAddGrowableFunctionTable (
- PVOID *DynamicTable, RUNTIME_FUNCTION* FunctionTable, ULONG EntryCount,
+ PVOID *DynamicTable, PT_RUNTIME_FUNCTION FunctionTable, ULONG EntryCount,
ULONG MaximumEntryCount, ULONG_PTR rangeStart, ULONG_PTR rangeEnd) { *DynamicTable = (PVOID) 1; return 0; }
VOID WINAPI FakeRtlGrowFunctionTable (PVOID DynamicTable, ULONG NewEntryCount) { }
VOID WINAPI FakeRtlDeleteGrowableFunctionTable (PVOID DynamicTable) {}
@@ -158,7 +158,7 @@ UnwindInfoTable::UnwindInfoTable(ULONG_PTR rangeStart, ULONG_PTR rangeEnd, ULONG
iRangeStart = rangeStart;
iRangeEnd = rangeEnd;
hHandle = NULL;
- pTable = new RUNTIME_FUNCTION[cTableMaxCount];
+ pTable = new T_RUNTIME_FUNCTION[cTableMaxCount];
}
/****************************************************************************/
@@ -221,7 +221,7 @@ void UnwindInfoTable::UnRegister()
// Add 'data' to the linked list whose head is pointed at by 'unwindInfoPtr'
//
/* static */
-void UnwindInfoTable::AddToUnwindInfoTable(UnwindInfoTable** unwindInfoPtr, RUNTIME_FUNCTION* data,
+void UnwindInfoTable::AddToUnwindInfoTable(UnwindInfoTable** unwindInfoPtr, PT_RUNTIME_FUNCTION data,
TADDR rangeStart, TADDR rangeEnd)
{
CONTRACTL
@@ -377,7 +377,7 @@ void UnwindInfoTable::AddToUnwindInfoTable(UnwindInfoTable** unwindInfoPtr, RUNT
// Publish the stack unwind data 'data' which is relative 'baseAddress'
// to the operating system in a way ETW stack tracing can use.
-/* static */ void UnwindInfoTable::PublishUnwindInfoForMethod(TADDR baseAddress, RUNTIME_FUNCTION* unwindInfo, int unwindInfoCount)
+/* static */ void UnwindInfoTable::PublishUnwindInfoForMethod(TADDR baseAddress, PT_RUNTIME_FUNCTION unwindInfo, int unwindInfoCount)
{
STANDARD_VM_CONTRACT;
if (!s_publishingActive)
@@ -2139,16 +2139,16 @@ void CodeHeapRequestInfo::Init()
#ifdef WIN64EXCEPTIONS
#ifdef _WIN64
-extern "C" PRUNTIME_FUNCTION GetRuntimeFunctionCallback(IN ULONG64 ControlPc,
+extern "C" PT_RUNTIME_FUNCTION GetRuntimeFunctionCallback(IN ULONG64 ControlPc,
IN PVOID Context)
#else
-extern "C" PRUNTIME_FUNCTION GetRuntimeFunctionCallback(IN ULONG ControlPc,
+extern "C" PT_RUNTIME_FUNCTION GetRuntimeFunctionCallback(IN ULONG ControlPc,
IN PVOID Context)
#endif
{
WRAPPER_NO_CONTRACT;
- PRUNTIME_FUNCTION prf = NULL;
+ PT_RUNTIME_FUNCTION prf = NULL;
// We must preserve this so that GCStress=4 eh processing doesnt kill last error.
BEGIN_PRESERVE_LAST_ERROR;
@@ -2492,7 +2492,7 @@ CodeHeader* EEJitManager::allocCode(MethodDesc* pMD, size_t blockSize, CorJitAll
SIZE_T totalSize = blockSize;
#if defined(USE_INDIRECT_CODEHEADER)
- SIZE_T realHeaderSize = offsetof(RealCodeHeader, unwindInfos[0]) + (sizeof(RUNTIME_FUNCTION) * nUnwindInfos);
+ SIZE_T realHeaderSize = offsetof(RealCodeHeader, unwindInfos[0]) + (sizeof(T_RUNTIME_FUNCTION) * nUnwindInfos);
// if this is a LCG method then we will be allocating the RealCodeHeader
// following the code so that the code block can be removed easily by
@@ -3913,13 +3913,13 @@ void GetUnmanagedStackWalkInfo(IN ULONG64 ControlPc,
T_RUNTIME_FUNCTION functionEntry;
DWORD dwLow = 0;
- DWORD dwHigh = cbSize / sizeof(RUNTIME_FUNCTION);
+ DWORD dwHigh = cbSize / sizeof(T_RUNTIME_FUNCTION);
DWORD dwMid = 0;
while (dwLow <= dwHigh)
{
dwMid = (dwLow + dwHigh) >> 1;
- taFuncEntry = pExceptionDir + dwMid * sizeof(RUNTIME_FUNCTION);
+ taFuncEntry = pExceptionDir + dwMid * sizeof(T_RUNTIME_FUNCTION);
hr = DacReadAll(taFuncEntry, &functionEntry, sizeof(functionEntry), false);
if (FAILED(hr))
{
@@ -5688,7 +5688,7 @@ static void EnumRuntimeFunctionEntriesToFindEntry(PTR_RUNTIME_FUNCTION pRtf, PTR
IMAGE_DATA_DIRECTORY * pProgramExceptionsDirectory = pNativeLayout->GetDirectoryEntry(IMAGE_DIRECTORY_ENTRY_EXCEPTION);
if (!pProgramExceptionsDirectory ||
(pProgramExceptionsDirectory->Size == 0) ||
- (pProgramExceptionsDirectory->Size % sizeof(RUNTIME_FUNCTION) != 0))
+ (pProgramExceptionsDirectory->Size % sizeof(T_RUNTIME_FUNCTION) != 0))
{
// Program exceptions directory malformatted
return;
@@ -5698,7 +5698,7 @@ static void EnumRuntimeFunctionEntriesToFindEntry(PTR_RUNTIME_FUNCTION pRtf, PTR
PTR_RUNTIME_FUNCTION firstFunctionEntry(moduleBase + pProgramExceptionsDirectory->VirtualAddress);
if (pRtf < firstFunctionEntry ||
- ((dac_cast<TADDR>(pRtf) - dac_cast<TADDR>(firstFunctionEntry)) % sizeof(RUNTIME_FUNCTION) != 0))
+ ((dac_cast<TADDR>(pRtf) - dac_cast<TADDR>(firstFunctionEntry)) % sizeof(T_RUNTIME_FUNCTION) != 0))
{
// Program exceptions directory malformatted
return;
@@ -5717,7 +5717,7 @@ static void EnumRuntimeFunctionEntriesToFindEntry(PTR_RUNTIME_FUNCTION pRtf, PTR
#endif // defined(_MSC_VER)
ULONG low = 0; // index in the function entry table of low end of search range
- ULONG high = (pProgramExceptionsDirectory->Size)/sizeof(RUNTIME_FUNCTION) - 1; // index of high end of search range
+ ULONG high = (pProgramExceptionsDirectory->Size)/sizeof(T_RUNTIME_FUNCTION) - 1; // index of high end of search range
ULONG mid = (low + high) /2; // index of entry to be compared
if (indexToLocate > high)
diff --git a/src/vm/codeman.h b/src/vm/codeman.h
index 3f10aba74c..dbe990e9ab 100644
--- a/src/vm/codeman.h
+++ b/src/vm/codeman.h
@@ -141,7 +141,7 @@ public:
#ifdef WIN64EXCEPTIONS
DWORD nUnwindInfos;
- RUNTIME_FUNCTION unwindInfos[0];
+ T_RUNTIME_FUNCTION unwindInfos[0];
#endif // WIN64EXCEPTIONS
public:
@@ -304,7 +304,7 @@ public:
SUPPORTS_DAC;
_ASSERTE(iUnwindInfo < GetNumberOfUnwindInfos());
return dac_cast<PTR_RUNTIME_FUNCTION>(
- PTR_TO_MEMBER_TADDR(RealCodeHeader, pRealCodeHeader, unwindInfos) + iUnwindInfo * sizeof(RUNTIME_FUNCTION));
+ PTR_TO_MEMBER_TADDR(RealCodeHeader, pRealCodeHeader, unwindInfos) + iUnwindInfo * sizeof(T_RUNTIME_FUNCTION));
}
#endif // WIN64EXCEPTIONS
@@ -531,12 +531,12 @@ public:
// All public functions are thread-safe.
// These are wrapper functions over the UnwindInfoTable functions that are specific to JIT compile code
- static void PublishUnwindInfoForMethod(TADDR baseAddress, RUNTIME_FUNCTION* unwindInfo, int unwindInfoCount);
+ static void PublishUnwindInfoForMethod(TADDR baseAddress, T_RUNTIME_FUNCTION* unwindInfo, int unwindInfoCount);
static void UnpublishUnwindInfoForMethod(TADDR entryPoint);
// These are lower level functions that assume you have found the list of UnwindInfoTable entries
// These are used by the stublinker and the high-level method functions above
- static void AddToUnwindInfoTable(UnwindInfoTable** unwindInfoPtr, RUNTIME_FUNCTION* data, TADDR rangeStart, TADDR rangeEnd);
+ static void AddToUnwindInfoTable(UnwindInfoTable** unwindInfoPtr, T_RUNTIME_FUNCTION* data, TADDR rangeStart, TADDR rangeEnd);
static void RemoveFromUnwindInfoTable(UnwindInfoTable** unwindInfoPtr, TADDR baseAddress, TADDR entryPoint);
// By default this publishing is off, this routine turns it on (and optionally publishes existing methods)
@@ -556,7 +556,7 @@ private:
PVOID hHandle; // OS handle for a published RUNTIME_FUNCTION table
ULONG_PTR iRangeStart; // Start of memory described by this table
ULONG_PTR iRangeEnd; // End of memory described by this table
- RUNTIME_FUNCTION* pTable; // The actual list of method unwind info, sorted by address
+ T_RUNTIME_FUNCTION* pTable; // The actual list of method unwind info, sorted by address
ULONG cTableCurCount;
ULONG cTableMaxCount;
int cDeletedEntries; // Number of slots we removed.
diff --git a/src/vm/exceptionhandling.cpp b/src/vm/exceptionhandling.cpp
index 35d95120dd..14ba4e4b42 100644
--- a/src/vm/exceptionhandling.cpp
+++ b/src/vm/exceptionhandling.cpp
@@ -5350,7 +5350,7 @@ void FixupDispatcherContext(DISPATCHER_CONTEXT* pDispatcherContext, CONTEXT* pCo
#endif // _TARGET_ARM_ || _TARGET_ARM64_
- INDEBUG(pDispatcherContext->FunctionEntry = (PRUNTIME_FUNCTION)INVALID_POINTER_CD);
+ INDEBUG(pDispatcherContext->FunctionEntry = (PT_RUNTIME_FUNCTION)INVALID_POINTER_CD);
INDEBUG(pDispatcherContext->ImageBase = INVALID_POINTER_CD);
pDispatcherContext->FunctionEntry = RtlLookupFunctionEntry(pDispatcherContext->ControlPc,
@@ -5358,7 +5358,7 @@ void FixupDispatcherContext(DISPATCHER_CONTEXT* pDispatcherContext, CONTEXT* pCo
NULL
);
- _ASSERTE(((PRUNTIME_FUNCTION)INVALID_POINTER_CD) != pDispatcherContext->FunctionEntry);
+ _ASSERTE(((PT_RUNTIME_FUNCTION)INVALID_POINTER_CD) != pDispatcherContext->FunctionEntry);
_ASSERTE(INVALID_POINTER_CD != pDispatcherContext->ImageBase);
//
diff --git a/src/vm/i386/stublinkerx86.cpp b/src/vm/i386/stublinkerx86.cpp
index 362edb542c..2d9e01f69f 100644
--- a/src/vm/i386/stublinkerx86.cpp
+++ b/src/vm/i386/stublinkerx86.cpp
@@ -3638,7 +3638,7 @@ extern "C" VOID __cdecl DebugCheckStubUnwindInfoWorker (CONTEXT *pStubContext)
LOG((LF_STUBS, LL_INFO1000000, "pc %p, sp %p\n", ControlPc, GetSP(&ctx)));
ULONG64 ImageBase;
- RUNTIME_FUNCTION *pFunctionEntry = RtlLookupFunctionEntry(
+ T_RUNTIME_FUNCTION *pFunctionEntry = RtlLookupFunctionEntry(
ControlPc,
&ImageBase,
NULL);
diff --git a/src/vm/jithelpers.cpp b/src/vm/jithelpers.cpp
index 95ba2b4ae2..aa99f06ab9 100644
--- a/src/vm/jithelpers.cpp
+++ b/src/vm/jithelpers.cpp
@@ -6676,8 +6676,8 @@ void F_CALL_VA_CONV JIT_TailCall(PCODE copyArgs, PCODE target, ...)
CONTEXT ctx;
// Unwind back to our caller in managed code
- static PRUNTIME_FUNCTION my_pdata;
- static ULONG_PTR my_imagebase;
+ static PT_RUNTIME_FUNCTION my_pdata;
+ static ULONG_PTR my_imagebase;
ctx.ContextFlags = CONTEXT_ALL;
RtlCaptureContext(&ctx);
@@ -7035,7 +7035,7 @@ void InitJitHelperLogging()
hlpFuncCount->count = 0;
#ifdef _TARGET_AMD64_
ULONGLONG uImageBase;
- PRUNTIME_FUNCTION pFunctionEntry;
+ PT_RUNTIME_FUNCTION pFunctionEntry;
pFunctionEntry = RtlLookupFunctionEntry((ULONGLONG)hlpFunc->pfnHelper, &uImageBase, NULL);
if (pFunctionEntry != NULL)
@@ -7080,7 +7080,7 @@ void InitJitHelperLogging()
#ifdef _TARGET_AMD64_
ULONGLONG uImageBase;
- PRUNTIME_FUNCTION pFunctionEntry;
+ PT_RUNTIME_FUNCTION pFunctionEntry;
pFunctionEntry = RtlLookupFunctionEntry((ULONGLONG)hlpFunc->pfnHelper, &uImageBase, NULL);
if (pFunctionEntry != NULL)
diff --git a/src/vm/jitinterface.cpp b/src/vm/jitinterface.cpp
index 3247ccb100..46542482ba 100644
--- a/src/vm/jitinterface.cpp
+++ b/src/vm/jitinterface.cpp
@@ -6092,6 +6092,17 @@ void CEEInfo::getReadyToRunHelper(
}
/***********************************************************************/
+void CEEInfo::getReadyToRunDelegateCtorHelper(
+ CORINFO_RESOLVED_TOKEN * pTargetMethod,
+ CORINFO_CLASS_HANDLE delegateType,
+ CORINFO_CONST_LOOKUP * pLookup
+ )
+{
+ LIMITED_METHOD_CONTRACT;
+ UNREACHABLE(); // only called during NGen
+}
+
+/***********************************************************************/
// see code:Nullable#NullableVerification
CORINFO_CLASS_HANDLE CEEInfo::getTypeForBox(CORINFO_CLASS_HANDLE cls)
@@ -10467,7 +10478,7 @@ void CEEJitInfo::allocUnwindInfo (
_ASSERTE(m_usedUnwindInfos > 0);
}
- PRUNTIME_FUNCTION pRuntimeFunction = m_CodeHeader->GetUnwindInfo(m_usedUnwindInfos);
+ PT_RUNTIME_FUNCTION pRuntimeFunction = m_CodeHeader->GetUnwindInfo(m_usedUnwindInfos);
m_usedUnwindInfos++;
// Make sure that the RUNTIME_FUNCTION is aligned on a DWORD sized boundary
@@ -10552,7 +10563,7 @@ void CEEJitInfo::allocUnwindInfo (
for (ULONG iUnwindInfo = 0; iUnwindInfo < m_usedUnwindInfos - 1; iUnwindInfo++)
{
- PRUNTIME_FUNCTION pOtherFunction = m_CodeHeader->GetUnwindInfo(iUnwindInfo);
+ PT_RUNTIME_FUNCTION pOtherFunction = m_CodeHeader->GetUnwindInfo(iUnwindInfo);
_ASSERTE(( RUNTIME_FUNCTION__BeginAddress(pOtherFunction) >= RUNTIME_FUNCTION__EndAddress(pRuntimeFunction, baseAddress)
|| RUNTIME_FUNCTION__EndAddress(pOtherFunction, baseAddress) <= RUNTIME_FUNCTION__BeginAddress(pRuntimeFunction)));
}
@@ -13671,7 +13682,7 @@ LPVOID EECodeInfo::findNextFunclet (LPVOID pvFuncletStart, SIZE_T
while (cbCode > 0)
{
- PRUNTIME_FUNCTION pFunctionEntry;
+ PT_RUNTIME_FUNCTION pFunctionEntry;
ULONGLONG uImageBase;
#ifdef FEATURE_PAL
EECodeInfo codeInfo;
@@ -13683,7 +13694,7 @@ LPVOID EECodeInfo::findNextFunclet (LPVOID pvFuncletStart, SIZE_T
// This is GCStress debug only - use the slow OS APIs to enumerate funclets
//
- pFunctionEntry = (PRUNTIME_FUNCTION) RtlLookupFunctionEntry((ULONGLONG)pvFuncletStart,
+ pFunctionEntry = (PT_RUNTIME_FUNCTION) RtlLookupFunctionEntry((ULONGLONG)pvFuncletStart,
&uImageBase
AMD64_ARG(NULL)
);
diff --git a/src/vm/jitinterface.h b/src/vm/jitinterface.h
index 215ceda4b2..00edc6e212 100644
--- a/src/vm/jitinterface.h
+++ b/src/vm/jitinterface.h
@@ -538,6 +538,12 @@ public:
CORINFO_CONST_LOOKUP * pLookup
);
+ void getReadyToRunDelegateCtorHelper(
+ CORINFO_RESOLVED_TOKEN * pTargetMethod,
+ CORINFO_CLASS_HANDLE delegateType,
+ CORINFO_CONST_LOOKUP * pLookup
+ );
+
CorInfoInitClassResult initClass(
CORINFO_FIELD_HANDLE field,
CORINFO_METHOD_HANDLE method,
diff --git a/src/vm/nativeformatreader.h b/src/vm/nativeformatreader.h
index cfebb498ca..a410884626 100644
--- a/src/vm/nativeformatreader.h
+++ b/src/vm/nativeformatreader.h
@@ -44,7 +44,11 @@ namespace NativeFormat
void ThrowBadImageFormatException()
{
_ASSERTE(false);
- ThrowHR(COR_E_BADIMAGEFORMAT);
+
+#ifndef DACCESS_COMPILE
+ // Failfast instead of throwing, to avoid violating NOTHROW contracts of callers
+ EEPOLICY_HANDLE_FATAL_ERROR(COR_E_BADIMAGEFORMAT);
+#endif
}
uint EnsureOffsetInRange(uint offset, uint lookAhead)
diff --git a/src/vm/readytoruninfo.cpp b/src/vm/readytoruninfo.cpp
index d00db7150f..158a23370f 100644
--- a/src/vm/readytoruninfo.cpp
+++ b/src/vm/readytoruninfo.cpp
@@ -84,7 +84,7 @@ BOOL ReadyToRunInfo::TryLookupTypeTokenFromName(NameHandle *pName, mdToken * pFo
{
GC_NOTRIGGER;
NOTHROW;
- SO_TOLERANT;
+ SO_INTOLERANT;
SUPPORTS_DAC;
PRECONDITION(!m_availableTypesHashtable.IsNull());
}
@@ -429,8 +429,8 @@ ReadyToRunInfo::ReadyToRunInfo(Module * pModule, PEImageLayout * pLayout, READYT
IMAGE_DATA_DIRECTORY * pRuntimeFunctionsDir = FindSection(READYTORUN_SECTION_RUNTIME_FUNCTIONS);
if (pRuntimeFunctionsDir != NULL)
{
- m_pRuntimeFunctions = (RUNTIME_FUNCTION *)pLayout->GetDirectoryData(pRuntimeFunctionsDir);
- m_nRuntimeFunctions = pRuntimeFunctionsDir->Size / sizeof(RUNTIME_FUNCTION);
+ m_pRuntimeFunctions = (T_RUNTIME_FUNCTION *)pLayout->GetDirectoryData(pRuntimeFunctionsDir);
+ m_nRuntimeFunctions = pRuntimeFunctionsDir->Size / sizeof(T_RUNTIME_FUNCTION);
}
else
{
diff --git a/src/vm/rtlfunctions.h b/src/vm/rtlfunctions.h
index d08cd75699..9d1d46b6f8 100644
--- a/src/vm/rtlfunctions.h
+++ b/src/vm/rtlfunctions.h
@@ -20,7 +20,7 @@ enum EEDynamicFunctionTableType
};
// Used by OutOfProcessFunctionTableCallback in DLLS\mscordbg\DebugSupport.cpp
-// to figure out how to parse a dunamic function table that was registered
+// to figure out how to parse a dynamic function table that was registered
// with a callback.
inline
EEDynamicFunctionTableType IdentifyDynamicFunctionTableTypeFromContext (PVOID pvContext)
@@ -65,7 +65,7 @@ inline
VOID DeleteEEFunctionTable(
PVOID pvTableID)
{
- RtlDeleteFunctionTable((PRUNTIME_FUNCTION)((ULONG64)pvTableID | 3));
+ RtlDeleteFunctionTable((PT_RUNTIME_FUNCTION)((ULONG64)pvTableID | 3));
}
#else // WIN64EXCEPTIONS && !DACCESS_COMPILE && !CROSSGEN_COMPILE && !FEATURE_PAL
diff --git a/src/vm/stackwalk.cpp b/src/vm/stackwalk.cpp
index 2250fd517a..3c2dfd7f84 100644
--- a/src/vm/stackwalk.cpp
+++ b/src/vm/stackwalk.cpp
@@ -596,7 +596,7 @@ PCODE Thread::VirtualUnwindCallFrame(T_CONTEXT* pContext,
#if !defined(DACCESS_COMPILE)
UINT_PTR uImageBase;
- PRUNTIME_FUNCTION pFunctionEntry;
+ PT_RUNTIME_FUNCTION pFunctionEntry;
if (pCodeInfo == NULL)
{
@@ -623,7 +623,7 @@ PCODE Thread::VirtualUnwindCallFrame(T_CONTEXT* pContext,
#if defined(_DEBUG) && !defined(FEATURE_PAL)
UINT_PTR uImageBaseFromOS;
- PRUNTIME_FUNCTION pFunctionEntryFromOS;
+ PT_RUNTIME_FUNCTION pFunctionEntryFromOS;
pFunctionEntryFromOS = RtlLookupFunctionEntry(uControlPc,
ARM_ONLY((DWORD*))(&uImageBaseFromOS),
@@ -679,7 +679,7 @@ PCODE Thread::VirtualUnwindLeafCallFrame(T_CONTEXT* pContext)
#if defined(_DEBUG) && !defined(FEATURE_PAL)
UINT_PTR uImageBase;
- PRUNTIME_FUNCTION pFunctionEntry = RtlLookupFunctionEntry((UINT_PTR)GetIP(pContext),
+ PT_RUNTIME_FUNCTION pFunctionEntry = RtlLookupFunctionEntry((UINT_PTR)GetIP(pContext),
ARM_ONLY((DWORD*))(&uImageBase),
NULL);
@@ -708,7 +708,7 @@ PCODE Thread::VirtualUnwindLeafCallFrame(T_CONTEXT* pContext)
// static
PCODE Thread::VirtualUnwindNonLeafCallFrame(T_CONTEXT* pContext, KNONVOLATILE_CONTEXT_POINTERS* pContextPointers,
- PRUNTIME_FUNCTION pFunctionEntry, UINT_PTR uImageBase)
+ PT_RUNTIME_FUNCTION pFunctionEntry, UINT_PTR uImageBase)
{
CONTRACTL
{
diff --git a/src/vm/stublink.cpp b/src/vm/stublink.cpp
index 92b4a15209..d1833260c5 100644
--- a/src/vm/stublink.cpp
+++ b/src/vm/stublink.cpp
@@ -1476,7 +1476,7 @@ bool StubLinker::EmitUnwindInfo(Stub* pStub, int globalsize)
//
// Fill in the RUNTIME_FUNCTION struct for this prologue.
//
- RUNTIME_FUNCTION *pCurFunction = &pUnwindInfoHeader->FunctionEntry;
+ PT_RUNTIME_FUNCTION pCurFunction = &pUnwindInfoHeader->FunctionEntry;
_ASSERTE(IS_ALIGNED(pCurFunction, sizeof(ULONG)));
S_UINT32 sBeginAddress = S_BYTEPTR(pCode) - S_BYTEPTR(pbBaseAddress);
@@ -1499,7 +1499,7 @@ bool StubLinker::EmitUnwindInfo(Stub* pStub, int globalsize)
//
UNWIND_INFO *pUnwindInfo = &pUnwindInfoHeader->UnwindInfo;
- RUNTIME_FUNCTION *pCurFunction = &pUnwindInfoHeader->FunctionEntry;
+ PT_RUNTIME_FUNCTION pCurFunction = &pUnwindInfoHeader->FunctionEntry;
_ASSERTE(IS_ALIGNED(pCurFunction, sizeof(ULONG)));
S_UINT32 sBeginAddress = S_BYTEPTR(pCode) - S_BYTEPTR(pbBaseAddress);
diff --git a/src/vm/stublink.h b/src/vm/stublink.h
index 8df3499b68..d7f0034587 100644
--- a/src/vm/stublink.h
+++ b/src/vm/stublink.h
@@ -349,7 +349,7 @@ protected:
{
if (m_nUnwindSlots == 0) return 0;
- return sizeof(RUNTIME_FUNCTION) + offsetof(UNWIND_INFO, UnwindCode) + m_nUnwindSlots * sizeof(UNWIND_CODE);
+ return sizeof(T_RUNTIME_FUNCTION) + offsetof(UNWIND_INFO, UnwindCode) + m_nUnwindSlots * sizeof(UNWIND_CODE);
}
#endif // _TARGET_AMD64_
@@ -359,7 +359,7 @@ protected:
// epilog.
private:
// Reserve fixed size block that's big enough to fit any unwind info we can have
- static const int c_nUnwindInfoSize = sizeof(RUNTIME_FUNCTION) + sizeof(DWORD) + MAX_UNWIND_CODE_WORDS *4;
+ static const int c_nUnwindInfoSize = sizeof(T_RUNTIME_FUNCTION) + sizeof(DWORD) + MAX_UNWIND_CODE_WORDS *4;
//
// Returns total UnwindInfoSize, including RUNTIME_FUNCTION entry
@@ -377,7 +377,7 @@ private:
private:
// Reserve fixed size block that's big enough to fit any unwind info we can have
- static const int c_nUnwindInfoSize = sizeof(RUNTIME_FUNCTION) + sizeof(DWORD) + MAX_UNWIND_CODE_WORDS *4;
+ static const int c_nUnwindInfoSize = sizeof(T_RUNTIME_FUNCTION) + sizeof(DWORD) + MAX_UNWIND_CODE_WORDS *4;
UINT UnwindInfoSize(UINT codeSize)
{
if (!m_fProlog) return 0;
diff --git a/src/vm/threads.h b/src/vm/threads.h
index 9cf309d70a..26477af2fc 100644
--- a/src/vm/threads.h
+++ b/src/vm/threads.h
@@ -3625,7 +3625,7 @@ public:
static UINT_PTR VirtualUnwindCallFrame(PREGDISPLAY pRD, EECodeInfo * pCodeInfo = NULL);
static PCODE VirtualUnwindLeafCallFrame(T_CONTEXT* pContext);
static PCODE VirtualUnwindNonLeafCallFrame(T_CONTEXT* pContext, T_KNONVOLATILE_CONTEXT_POINTERS* pContextPointers = NULL,
- PRUNTIME_FUNCTION pFunctionEntry = NULL, UINT_PTR uImageBase = NULL);
+ PT_RUNTIME_FUNCTION pFunctionEntry = NULL, UINT_PTR uImageBase = NULL);
static UINT_PTR VirtualUnwindToFirstManagedCallFrame(T_CONTEXT* pContext);
#endif // WIN64EXCEPTIONS
diff --git a/src/vm/win32threadpool.cpp b/src/vm/win32threadpool.cpp
index af7b26c1e2..fc25f4e7b9 100644
--- a/src/vm/win32threadpool.cpp
+++ b/src/vm/win32threadpool.cpp
@@ -305,11 +305,13 @@ DWORD GetDefaultMaxLimitWorkerThreads(DWORD minLimit)
DWORD GetForceMinWorkerThreadsValue()
{
+ WRAPPER_NO_CONTRACT;
return Configuration::GetKnobDWORDValue(W("System.Threading.ThreadPool.MinThreads"), CLRConfig::INTERNAL_ThreadPool_ForceMinWorkerThreads);
}
DWORD GetForceMaxWorkerThreadsValue()
{
+ WRAPPER_NO_CONTRACT;
return Configuration::GetKnobDWORDValue(W("System.Threading.ThreadPool.MaxThreads"), CLRConfig::INTERNAL_ThreadPool_ForceMaxWorkerThreads);
}