Skip to content

Commit 9055c8b

Browse files
authored
mono_get_generic_info_from_stack_frame fix for default interface methods (#64566)
The context is a MonoMethodRuntimeGenericContext when the method is a default interface method. Also re-enable broken DIM tests. Fixes dotnet/runtime #62334
1 parent 607dcce commit 9055c8b

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/mono/mono/mini/mini-exceptions.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ mono_get_generic_info_from_stack_frame (MonoJitInfo *ji, MonoContext *ctx)
849849
}
850850

851851
method = jinfo_get_method (ji);
852-
if (mono_method_get_context (method)->method_inst) {
852+
if (mono_method_get_context (method)->method_inst || mini_method_is_default_method (method)) {
853853
/* A MonoMethodRuntimeGenericContext* */
854854
return info;
855855
} else if ((method->flags & METHOD_ATTRIBUTE_STATIC) || m_class_is_valuetype (method->klass)) {

src/tests/issues.targets

-3
Original file line numberDiff line numberDiff line change
@@ -2902,9 +2902,6 @@
29022902
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventcounter/**">
29032903
<Issue> needs triage </Issue>
29042904
</ExcludeList>
2905-
<ExcludeList Include = "$(XunitTestBinBase)/Loader/classloader/DefaultInterfaceMethods/regressions/github60486/**">
2906-
<Issue>https://github.com./dotnet/runtime/issues/62334</Issue>
2907-
</ExcludeList>
29082905
</ItemGroup>
29092906

29102907
<ItemGroup Condition="'$(RuntimeFlavor)' == 'mono' and ('$(RuntimeVariant)' == 'llvmfullaot' or '$(RuntimeVariant)' == 'llvmaot') and '$(TargetArchitecture)' == 'arm64'">

0 commit comments

Comments
 (0)