From ef4754093a2724ba6ead8e4ee5f56a6210f41453 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 21 Jun 2016 23:38:23 +0300 Subject: [PATCH] Fix assertion violation in GC_wait_builder called from start_mark_threads (Apply commit d02ea97 from 'master' branch.) * mark.c (GC_wait_for_markers_init): Surround function body with DISABLE/RESTORE_CANCEL. Conflicts: * include/private/gc_priv.h * pthread_support.c * win32_threads.c --- mark.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mark.c b/mark.c index eb8efc79..e23a7966 100644 --- a/mark.c +++ b/mark.c @@ -914,10 +914,12 @@ GC_INNER word GC_mark_no = 0; GC_INNER void GC_wait_for_markers_init(void) { word count; + IF_CANCEL(int cancel_state;) if (GC_markers_m1 == 0) return; + DISABLE_CANCEL(cancel_state); /* Reuse marker lock and builders count to synchronize */ /* marker threads startup. */ GC_acquire_mark_lock(); @@ -926,6 +928,7 @@ GC_INNER void GC_wait_for_markers_init(void) GC_release_mark_lock(); if (count != 0) GC_wait_for_reclaim(); + RESTORE_CANCEL(cancel_state); } /* Steal mark stack entries starting at mse low into mark stack local */ -- 2.40.0