summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2015-05-18 08:57:03 -0700
committerJan Kotas <jkotas@microsoft.com>2015-05-18 08:57:03 -0700
commit086a8ae79915588aba55928641d499be9566f632 (patch)
tree3cb2f80ae6e0a9c85f69918cb34877f5213fe554 /src
parent72c19e068598f1aa6c46cd47239d207039d3df35 (diff)
parent802cd507539530bef95717f0378e524d86ca253d (diff)
downloadcoreclr-086a8ae79915588aba55928641d499be9566f632.tar.gz
coreclr-086a8ae79915588aba55928641d499be9566f632.tar.bz2
coreclr-086a8ae79915588aba55928641d499be9566f632.zip
Merge pull request #1013 from dotnet-bot/from-tfs
Merge changes from TFS
Diffstat (limited to 'src')
-rw-r--r--src/vm/corhost.cpp2
-rw-r--r--src/vm/pefile.inl9
-rw-r--r--src/vm/virtualcallstub.h5
3 files changed, 14 insertions, 2 deletions
diff --git a/src/vm/corhost.cpp b/src/vm/corhost.cpp
index a0343e4267..2e8d5aa4b7 100644
--- a/src/vm/corhost.cpp
+++ b/src/vm/corhost.cpp
@@ -1945,7 +1945,7 @@ HRESULT CorHost2::SetStartupFlags(STARTUP_FLAGS flag)
}
CONTRACTL_END;
- if (m_fStarted)
+ if (g_fEEStarted)
{
return HOST_E_INVALIDOPERATION;
}
diff --git a/src/vm/pefile.inl b/src/vm/pefile.inl
index 07d42d5859..e3017131e3 100644
--- a/src/vm/pefile.inl
+++ b/src/vm/pefile.inl
@@ -774,7 +774,14 @@ inline BOOL PEFile::IsIbcOptimized()
inline BOOL PEFile::IsILImageReadyToRun()
{
- WRAPPER_NO_CONTRACT;
+ CONTRACTL
+ {
+ INSTANCE_CHECK;
+ MODE_ANY;
+ NOTHROW;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
#ifdef FEATURE_PREJIT
if (IsNativeLoaded())
diff --git a/src/vm/virtualcallstub.h b/src/vm/virtualcallstub.h
index f5bf0d9506..02605f237d 100644
--- a/src/vm/virtualcallstub.h
+++ b/src/vm/virtualcallstub.h
@@ -325,6 +325,11 @@ public:
WRAPPER_NO_CONTRACT;
SUPPORTS_DAC;
+ // This method can called with stubStartAddress==NULL, e.g. when handling null reference exceptions
+ // caused by IP=0. Early out for this case to avoid confusing handled access violations inside predictStubKind.
+ if (PCODEToPINSTR(stubStartAddress) == NULL)
+ return SK_UNKNOWN;
+
// Rather than calling IsInRange(stubStartAddress) for each possible stub kind
// we can peek at the assembly code and predict which kind of a stub we have
StubKind predictedKind = predictStubKind(stubStartAddress);