Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[sgen] Don't try to wake up workers before they've been started.

We enqueue gray objects before starting the workers, so queue section redirection
can also happen before.  Don't crash with an assertion.
  • Loading branch information...
commit c27e6ad4d2ff829d7e6e6b162c3375c4caed47c8 1 parent 92a3746
@schani schani authored
View
3  mono/metadata/sgen-gc.c
@@ -2370,7 +2370,8 @@ gray_queue_redirect (SgenGrayQueue *queue)
if (wake) {
g_assert (concurrent_collection_in_progress);
- sgen_workers_wake_up_all ();
+ if (sgen_workers_have_started ())
+ sgen_workers_wake_up_all ();
}
}
View
6 mono/metadata/sgen-workers.c
@@ -481,6 +481,12 @@ sgen_workers_start_all_workers (void)
workers_started = TRUE;
}
+gboolean
+sgen_workers_have_started (void)
+{
+ return workers_gc_in_progress;
+}
+
void
sgen_workers_start_marking (void)
{
View
1  mono/metadata/sgen-workers.h
@@ -48,6 +48,7 @@ struct _JobQueueEntry {
void sgen_workers_init (int num_workers) MONO_INTERNAL;
void sgen_workers_start_all_workers (void) MONO_INTERNAL;
+gboolean sgen_workers_have_started (void) MONO_INTERNAL;
void sgen_workers_wake_up_all (void) MONO_INTERNAL;
void sgen_workers_init_distribute_gray_queue (void) MONO_INTERNAL;
void sgen_workers_enqueue_job (JobFunc func, void *data) MONO_INTERNAL;
Please sign in to comment.
Something went wrong with that request. Please try again.