1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-10 01:50:53 +09:00

Update assert to handle object[] element type (#105287)

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
This commit is contained in:
Aaron Robinson 2024-07-23 15:48:48 -07:00 committed by GitHub
parent 2c99cc5f2b
commit 1fd54b6eb2
Signed by: github
GPG key ID: B5690EEEBB952194

View file

@ -433,9 +433,10 @@ extern "C" void QCALLTYPE ExceptionNative_GetMethodFromStackTrace(QCall::ObjectH
// The stacktrace can be either sbyte[] or Object[]. In the latter case,
// the first entry is the actual stack trace sbyte[], the rest are pointers
// to the method info objects. We only care about the first entry here.
if (arrayBaseRef->GetArrayElementType() != ELEMENT_TYPE_I1)
CorElementType elemType = arrayBaseRef->GetArrayElementType();
if (elemType != ELEMENT_TYPE_I1)
{
_ASSERTE(arrayBaseRef->GetArrayElementType() == ELEMENT_TYPE_OBJECT);
_ASSERTE(elemType == ELEMENT_TYPE_CLASS); // object[]
PTRARRAYREF ptrArrayRef = (PTRARRAYREF)arrayBaseRef;
arrayBaseRef = (ARRAYBASEREF)OBJECTREFToObject(ptrArrayRef->GetAt(0));
}