[sgen] Fix a concurrent mark bug.
authorMark Probst <mark.probst@gmail.com>
Wed, 15 Apr 2015 22:55:42 +0000 (15:55 -0700)
committerMark Probst <mark.probst@gmail.com>
Wed, 15 Apr 2015 22:56:28 +0000 (15:56 -0700)
This made `sgen-descriptors.exe` crash with an assertion.

mono/metadata/sgen-workers.c

index 7417f8ba910589bfb7467b52f05e34d5adbe1d2d..9880d9b6ef0c05c75db9ed3c2a20f3a79b574543 100644 (file)
@@ -167,6 +167,14 @@ void
 sgen_workers_wait_for_jobs_finished (void)
 {
        sgen_thread_pool_wait_for_all_jobs ();
+       /*
+        * If the idle task was never triggered or it finished before the last job did and
+        * then didn't get triggered again, we might end up in the situation of having
+        * something in the gray queue yet the idle task not working.  The easiest way to
+        * make sure this doesn't stay that way is to just trigger it again after all jobs
+        * have finished.
+        */
+       sgen_workers_ensure_awake ();
 }
 
 void