From a75c0e1f71dcf49b41a40e0f34652f5f19d168fa Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Mon, 3 Oct 2016 10:22:59 +0300 Subject: [PATCH] Workaround 'local variable size too big' static analyzer warning * mark.c [PARALLEL_MARK] (LOCAL_MARK_STACK_SIZE): Define to smaller value if LINT2 (to avoid static analysis tool warning that local_mark_stack local variable size is very big). --- mark.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mark.c b/mark.c index e8d46ba..21ec553 100644 --- a/mark.c +++ b/mark.c @@ -898,10 +898,14 @@ STATIC unsigned GC_active_count = 0; /* Number of active helpers. */ GC_INNER word GC_mark_no = 0; -#define LOCAL_MARK_STACK_SIZE HBLKSIZE +#ifdef LINT2 +# define LOCAL_MARK_STACK_SIZE (HBLKSIZE / 8) +#else +# define LOCAL_MARK_STACK_SIZE HBLKSIZE /* Under normal circumstances, this is big enough to guarantee */ /* we don't overflow half of it in a single call to */ /* GC_mark_from. */ +#endif /* Wait all markers to finish initialization (i.e. store */ /* marker_[b]sp, marker_mach_threads, GC_marker_Id). */ -- 2.7.4