diff options
author | Dong-Heon Jung <dheon.jung@samsung.com> | 2019-12-24 04:11:43 +0900 |
---|---|---|
committer | 이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com> | 2019-12-24 18:22:19 +0900 |
commit | 218170021780204b29ccf95cd3282270facf129a (patch) | |
tree | 4d0a5d7224045905539a3506f13a7f9a7d000c09 | |
parent | 7f2fb0ae16dee5971136006a4182c98fe04f3bff (diff) | |
download | coreclr-218170021780204b29ccf95cd3282270facf129a.tar.gz coreclr-218170021780204b29ccf95cd3282270facf129a.tar.bz2 coreclr-218170021780204b29ccf95cd3282270facf129a.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.cpp | 9 |
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 |