Fix IsBlittable flag bug on types. (#34613)
authorFadi Hanna <fadim@microsoft.com>
Tue, 7 Apr 2020 05:19:15 +0000 (22:19 -0700)
committerGitHub <noreply@github.com>
Tue, 7 Apr 2020 05:19:15 +0000 (22:19 -0700)
commit247b657d314bf612d74e1c9eda3d3b8911f3769f
treec8b16ec37fa0e010b6d5bf38f950ae7000d5b97f
parent410b992bfba530841451fc4e1857be8ea1a8f92a
Fix IsBlittable flag bug on types. (#34613)

The issue is that we are automatically assuming that types are blittable until proven otherwise while traversing the list of fields declared on the type. In the case of a type with no fields, we have to also check if the parent type is blittable, before blindly setting the flag to true (Ex: what if the base type has non-blittable fields?)
src/coreclr/src/vm/classlayoutinfo.cpp