Avoid an assert in ves_icall_RuntimeFieldInfo_SetValueInternal (#64214)
authorBill Holmes <bill.holmes@unity3d.com>
Wed, 2 Feb 2022 01:01:28 +0000 (20:01 -0500)
committerGitHub <noreply@github.com>
Wed, 2 Feb 2022 01:01:28 +0000 (20:01 -0500)
commit6d70f1bc44424935ab2e5738d3a91ab975519a07
tree3dc43a54e314e46d4cf1463878678d5eb7029dcb
parentf531df6482c0778d34daa96ffbd905d9abd3879b
Avoid an assert in ves_icall_RuntimeFieldInfo_SetValueInternal (#64214)

When the field is a valuetype and the value being assigned to the field
is a reference type, throw an ArgumentException. Without this change the
call to mono_object_handle_pin_unbox will assert and kill the process.

This can occur when de-serializing an object and the field types have
changed.
src/mono/mono/metadata/icall.c