summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDong-Heon Jung <dheon.jung@samsung.com>2019-12-24 04:11:43 +0900
committerGleb Balykov <g.balykov@samsung.com>2020-03-25 15:29:41 +0300
commit6edd12dd279de29d2dd781ba2b489eff7f6f889d (patch)
tree28d8ecb9e7282dcc97db40e6c1fc423b008ffac1 /src
parent3741242c09ceb4695ba27938f34ff19d90280b49 (diff)
downloadcoreclr-6edd12dd279de29d2dd781ba2b489eff7f6f889d.tar.gz
coreclr-6edd12dd279de29d2dd781ba2b489eff7f6f889d.tar.bz2
coreclr-6edd12dd279de29d2dd781ba2b489eff7f6f889d.zip
Change bIsFree check in DacValidateMethodTable (#1086)
Some commands of SOS validate a method table in DacValidateMethodTable. In the function, it checks whether a method table is FreeObjectMethodTable or not with GetClass() value. However, GetClass() should not be NULL. (There is an assert in GetClass()) In this patch, it compares pMT address with g_pFreeObjectMethodTable address only.
Diffstat (limited to 'src')
-rw-r--r--src/debug/daccess/request.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/debug/daccess/request.cpp b/src/debug/daccess/request.cpp
index 3c40557fd0..0694b1ecbe 100644
--- a/src/debug/daccess/request.cpp
+++ b/src/debug/daccess/request.cpp
@@ -129,15 +129,8 @@ BOOL DacValidateMethodTable(MethodTable *pMT, BOOL &bIsFree)
EX_TRY
{
bIsFree = FALSE;
- EEClass *pEEClass = pMT->GetClass();
- if (pEEClass==NULL)
+ if (HOST_CDADDR(pMT) == HOST_CDADDR(g_pFreeObjectMethodTable))
{
- // Okay to have a NULL EEClass if this is a free methodtable
- CLRDATA_ADDRESS MethTableAddr = HOST_CDADDR(pMT);
- CLRDATA_ADDRESS FreeObjMethTableAddr = HOST_CDADDR(g_pFreeObjectMethodTable);
- if (MethTableAddr != FreeObjMethTableAddr)
- goto BadMethodTable;
-
bIsFree = TRUE;
}
else