Skip to content

Commit

Permalink
[Debugger] Debugger failure when a method is called in watches and an…
Browse files Browse the repository at this point in the history
…y field of the Class has the type of the field different of the value of the field because the assign was done in an unsafe way like this:

Now the datatypes check are not executed only when each field of the class is been checked before the invoke method..
_pinnable = Unsafe.As<Pinnable<T>>(array);
A unit test that reproduces the issue was created either.
Fixes mono#12374
  • Loading branch information
thaystg committed Jan 14, 2019
1 parent 8d5e28c commit 530d504
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mono/mini/debugger-agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -5600,7 +5600,7 @@ decode_value_internal (MonoType *t, int type, MonoDomain *domain, guint8 *addr,
} else if ((t->type == MONO_TYPE_GENERICINST) &&
mono_metadata_generic_class_is_valuetype (t->data.generic_class) &&
m_class_is_enumtype (t->data.generic_class->container_class)){
err = decode_vtype (t, domain, addr, buf, &buf, limit);
err = decode_vtype (t, domain, addr, buf, &buf, limit, check_field_datatype);
if (err != ERR_NONE)
return err;
} else {
Expand Down

0 comments on commit 530d504

Please sign in to comment.