From: Ivan Maidanski Date: Thu, 20 Apr 2017 21:22:10 +0000 (+0300) Subject: Prevent multiple 'Caught ACCESS_VIOLATION in marker' per collection X-Git-Tag: v8.0.0~775 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f92c11195105fdfdfcdd7ce6866d203e776e673b;p=gc Prevent multiple 'Caught ACCESS_VIOLATION in marker' per collection * mark.c [WRAP_MARK_SOME] (GC_mark_some): Do not call WARN() about ACCESS_VIOLATION more than once per garbage collection. --- diff --git a/mark.c b/mark.c index 4d7670cc..52914a78 100644 --- a/mark.c +++ b/mark.c @@ -590,9 +590,16 @@ static void alloc_mark_stack(size_t); handle_ex: /* Exception handler starts here for all cases. */ - WARN("Caught ACCESS_VIOLATION in marker;" - " memory mapping disappeared\n", 0); - + { + static word warned_gc_no; + + /* Warn about it at most once per collection. */ + if (warned_gc_no != GC_gc_no) { + warned_gc_no = GC_gc_no; + WARN("Caught ACCESS_VIOLATION in marker;" + " memory mapping disappeared\n", 0); + } + } /* We have bad roots on the stack. Discard mark stack. */ /* Rescan from marked objects. Redetermine roots. */ GC_invalidate_mark_state();