Skip to content

Commit

Permalink
[mono-dl] Don't do thread state transitions in mono_dl_fallback_register
Browse files Browse the repository at this point in the history
1. it doesn't touch the managed runtime

2. it may be called (arguably it ought to be called only) before the runtime is
initialized (and in particular before the current thread is attached).
  • Loading branch information
lambdageek authored and alexischr committed Apr 5, 2019
1 parent c61202d commit e728be3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mono/utils/mono-dl.c
Expand Up @@ -356,7 +356,6 @@ MonoDlFallbackHandler *
mono_dl_fallback_register (MonoDlFallbackLoad load_func, MonoDlFallbackSymbol symbol_func, MonoDlFallbackClose close_func, void *user_data)
{
MonoDlFallbackHandler *handler = NULL;
MONO_ENTER_GC_UNSAFE;
if (load_func == NULL || symbol_func == NULL)
goto leave;

Expand All @@ -369,7 +368,6 @@ mono_dl_fallback_register (MonoDlFallbackLoad load_func, MonoDlFallbackSymbol sy
fallback_handlers = g_slist_prepend (fallback_handlers, handler);

leave:
MONO_EXIT_GC_UNSAFE;
return handler;
}

Expand Down

0 comments on commit e728be3

Please sign in to comment.