summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDong-Heon Jung <dheon.jung@samsung.com>2019-12-24 04:11:43 +0900
committerHyungju Lee <leee.lee@samsung.com>2020-10-30 17:51:28 +0900
commit01c100e3d02b3525cdf67ddfe080ccd9a8a07a04 (patch)
tree6e57d2757156ab32a6cdedf3fbf5bab65bc55c0f
parent0418281162777e6ca7b9474070af0a9dce9d796a (diff)
downloadcoreclr-01c100e3d02b3525cdf67ddfe080ccd9a8a07a04.tar.gz
coreclr-01c100e3d02b3525cdf67ddfe080ccd9a8a07a04.tar.bz2
coreclr-01c100e3d02b3525cdf67ddfe080ccd9a8a07a04.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.
-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