summaryrefslogtreecommitdiff
path: root/src/ToolBox
diff options
context:
space:
mode:
authorCarol Eidt <carol.eidt@microsoft.com>2018-05-25 10:30:46 -0700
committerCarol Eidt <carol.eidt@microsoft.com>2018-05-25 12:07:57 -0700
commitf05efe953681375384577dcc77e488c4800715f1 (patch)
tree66bcb7973c22857372d533eddf96313e29bdea20 /src/ToolBox
parentf5bf3056389b7b6a7269921873bcbbd9b6f8c441 (diff)
downloadcoreclr-f05efe953681375384577dcc77e488c4800715f1.tar.gz
coreclr-f05efe953681375384577dcc77e488c4800715f1.tar.bz2
coreclr-f05efe953681375384577dcc77e488c4800715f1.zip
Check SuperPmi map for null
On Linux, calling an instance method with a null `this` pointer causes a seg fault. This fixes the case of querying the `CanInlineTypeCheckWithObjectVTable` map in SuperPmi when no query has been recorded by `recCanInlineTypeCheckWithObjectVTable`. There appear to be other cases of this, but this is the one that I'm running into currently.
Diffstat (limited to 'src/ToolBox')
-rw-r--r--src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp b/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp
index 61a654eb98..1fa824e70a 100644
--- a/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp
+++ b/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp
@@ -4327,6 +4327,7 @@ void MethodContext::dmpCanInlineTypeCheckWithObjectVTable(DWORDLONG key, DWORD v
}
BOOL MethodContext::repCanInlineTypeCheckWithObjectVTable(CORINFO_CLASS_HANDLE cls)
{
+ AssertCodeMsg(CanInlineTypeCheckWithObjectVTable != nullptr, EXCEPTIONCODE_MC, "No map for CanInlineTypeCheckWithObjectVTable");
return (BOOL)CanInlineTypeCheckWithObjectVTable->Get((DWORDLONG)cls);
}