Skip to content

Commit

Permalink
Merge pull request mono/mono#14552 from lewurm/interp-dimcall-fix
Browse files Browse the repository at this point in the history
[interp] add missing enum check on constrained callvirt

Commit migrated from mono/mono@84bc4bf
  • Loading branch information
lewing authored May 23, 2019
2 parents 4a6753b + 33bdf1a commit 2bf228e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mono/mono/mini/interp/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -1896,7 +1896,7 @@ interp_transform_call (TransformData *td, MonoMethod *method, MonoMethod *target
* but that type doesn't override the method we're
* calling, so we need to box `this'.
*/
if ((td->sp - csignature->param_count - 1)->type == STACK_TYPE_MP) {
if (target_method->klass == mono_defaults.enum_class && (td->sp - csignature->param_count - 1)->type == STACK_TYPE_MP) {
/* managed pointer on the stack, we need to deref that puppy */
/* Always load the entire stackval, to handle also the case where the enum has long storage */
interp_add_ins (td, MINT_LDIND_I8);
Expand Down

0 comments on commit 2bf228e

Please sign in to comment.