(Cherry-pick commits
c18ff9a,
4781c6d from 'release-7_4' branch.)
Global mark stack should not grow in parallel marker mode (as
fixed-size local_mark_stack is used instead).
* typd_mlc.c [PARALLEL_MARK] (GC_array_mark_proc): Do not set
GC_mark_stack_too_small if GC_parallel (and new_mark_stack_ptr is
null) unless mark_stack_limit belongs to the global mark stack; add
comment.
/* and request a mark stack expansion. */
/* This cannot cause a mark stack overflow, since it replaces */
/* the original array entry. */
- GC_mark_stack_too_small = TRUE;
+# ifdef PARALLEL_MARK
+ /* We might be using a local_mark_stack in parallel mode. */
+ if (GC_mark_stack + GC_mark_stack_size == mark_stack_limit)
+# endif
+ {
+ GC_mark_stack_too_small = TRUE;
+ }
new_mark_stack_ptr = orig_mark_stack_ptr + 1;
new_mark_stack_ptr -> mse_start = (ptr_t)addr;
new_mark_stack_ptr -> mse_descr = sz | GC_DS_LENGTH;