Skip to content

Commit

Permalink
[mono][jit] Pass generic context when ldftn of generic method (dotnet…
Browse files Browse the repository at this point in the history
  • Loading branch information
BrzVlad authored and radekdoulik committed Mar 30, 2022
1 parent 80e678a commit c1d3460
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/mono/mono/mini/jit-icalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ mono_ldftn (MonoMethod *method)

/* if we need the address of a native-to-managed wrapper, just compile it now, trampoline needs thread local
* variables that won't be there if we run on a thread that's not attached yet. */
if (method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED)
if (method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED) {
addr = mono_compile_method_checked (method, error);
else
} else {
addr = mono_create_jump_trampoline (method, FALSE, error);
if (mono_method_needs_static_rgctx_invoke (method, FALSE))
addr = mono_create_static_rgctx_trampoline (method, addr);
}
if (!is_ok (error)) {
mono_error_set_pending_exception (error);
return NULL;
Expand Down

0 comments on commit c1d3460

Please sign in to comment.