From: Bruce Forstall Date: Wed, 27 Sep 2017 21:42:04 +0000 (-0700) Subject: Fix issue with HFA altjit api X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83124c7aaf7f4236e24f4c4fde3863f1736f7d47;p=platform%2Fupstream%2Fcoreclr.git Fix issue with HFA altjit api One case in the Interop\ArrayMarshalling\ByValArray\MarshalArrayByValTest\MarshalArrayByValTest.cmd test marshals an array of strings as members of a struct. The !FEATURE_HFA code for IsHFA() needs to check for value type before calling CheckForHFA(), which will assert if it is not a value type. Fixes #14196. --- diff --git a/src/vm/class.cpp b/src/vm/class.cpp index e4268b57ec..9d82f775dc 100644 --- a/src/vm/class.cpp +++ b/src/vm/class.cpp @@ -1641,7 +1641,14 @@ bool MethodTable::IsHFA() #ifdef DACCESS_COMPILE return false; #else - return GetClass()->CheckForHFA(); + if (GetClass()->GetMethodTable()->IsValueType()) + { + return GetClass()->CheckForHFA(); + } + else + { + return false; + } #endif } #endif // !FEATURE_HFA