summaryrefslogtreecommitdiff
path: root/typd_mlc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2017-07-12 02:04:30 +0300
committerIvan Maidanski <ivmai@mail.ru>2017-07-12 02:04:30 +0300
commit3f06655fa82deb213082d2c2c7c87e797cd67370 (patch)
tree8d79ea21aac0130aa4bbb90f0c112a4e35c6a717 /typd_mlc.c
parentf530696ac2daf23b381a0b70cec116397f51675b (diff)
downloadbdwgc-3f06655fa82deb213082d2c2c7c87e797cd67370.tar.gz
Fix push_complex_descriptor to avoid unlimited global mark stack growth
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); add comment.
Diffstat (limited to 'typd_mlc.c')
-rw-r--r--typd_mlc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/typd_mlc.c b/typd_mlc.c
index ecee04f9..5e36d7f5 100644
--- a/typd_mlc.c
+++ b/typd_mlc.c
@@ -503,7 +503,13 @@ STATIC mse * GC_array_mark_proc(word * addr, mse * mark_stack_ptr,
/* 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 are using a local_mark_stack in parallel mode. */
+ if (!GC_parallel)
+# 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.w = sz | GC_DS_LENGTH;