Skip to content

Commit

Permalink
Wrap mono_gc_init_finalizer_thread() call with now-needed coop GC sta…
Browse files Browse the repository at this point in the history
…te transition.

Starting with mono/mono#16907 , the Mono runtime ends in GC-Safe state (mode) after mono_jit_init_version() is called. The monotouch code did not expect that, and calls mono_gc_init_finalizer_thread() which also tries to enter GC-safe mode.

Should fix mono/mono#19372
  • Loading branch information
alexischr authored and monojenkins committed Mar 31, 2020
1 parent 3601ac3 commit 7afdb65
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions runtime/monotouch-main.m
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ - (void) start
{
// COOP: ?
#if defined (__arm__) || defined(__aarch64__)
MONO_ENTER_GC_UNSAFE;
mono_gc_init_finalizer_thread ();
MONO_EXIT_GC_UNSAFE;
#endif
}

Expand Down

0 comments on commit 7afdb65

Please sign in to comment.