diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mono/mono/mini/aot-compiler.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mono/mono/mini/aot-compiler.c b/src/mono/mono/mini/aot-compiler.c index 14dd5380ef1..45f084d2c1e 100644 --- a/src/mono/mono/mini/aot-compiler.c +++ b/src/mono/mono/mini/aot-compiler.c @@ -10564,7 +10564,11 @@ mono_aot_method_hash (MonoMethod *method) hashes [0] = mono_metadata_str_hash (m_class_get_name (klass)); hashes [1] = mono_metadata_str_hash (m_class_get_name_space (klass)); } - hashes [2] = mono_metadata_str_hash (method->name); + if (method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE && mono_marshal_get_wrapper_info (method)->subtype == WRAPPER_SUBTYPE_ICALL_WRAPPER) + /* The name might not be set correctly if DISABLE_JIT is set */ + hashes [2] = mono_marshal_get_wrapper_info (method)->d.icall.jit_icall_id; + else + hashes [2] = mono_metadata_str_hash (method->name); hashes [3] = method->wrapper_type; hashes [4] = mono_aot_type_hash (sig->ret); hindex = 5; |