Skip to content

Commit

Permalink
[mono][aot] Avoid inflating methods with instantiations with a wrong …
Browse files Browse the repository at this point in the history
…argument count when using profiled AOT. (dotnet#70926)

Fixes dotnet#70773.
  • Loading branch information
vargaz authored Jul 5, 2022
1 parent 05c4467 commit 66aaeb0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mono/mono/mini/aot-compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -13109,6 +13109,9 @@ resolve_profile_data (MonoAotCompile *acfg, ProfileData *data, MonoAssembly* cur
if (mdata->inst->inst) {
MonoGenericContext ctx;

if (m->is_generic && mono_method_get_generic_container (m)->context.method_inst->type_argc != mdata->inst->inst->type_argc)
continue;

memset (&ctx, 0, sizeof (ctx));
ctx.method_inst = mdata->inst->inst;

Expand Down

0 comments on commit 66aaeb0

Please sign in to comment.