summaryrefslogtreecommitdiff
path: root/mark.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-01-12 11:12:47 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-01-12 20:57:14 +0300
commit9b4ac36d4af28cc8a050152ec0df8cbcee1ff56e (patch)
treefd40e2e06198d2b1fe75b0e91eb5dc75abe6e0cf /mark.c
parent7797312145631f10fa39e5ca9ef50170e0dc5076 (diff)
downloadbdwgc-9b4ac36d4af28cc8a050152ec0df8cbcee1ff56e.tar.gz
Check pointer tag in all mark procedures (E2K)
Issue #411 (bdwgc). Do not mark objects if its pointer tag is non-zero, not only in GC_mark_from and GC_push_all_eager, but also in add_back_edges, GC_ignore_self_finalize_mark_proc, GC_typed_mark_proc and GC_push_conditional_eager. * backgraph.c [MAKE_BACK_GRAPH] (add_back_edges): Change type of current_p local variable from word* to ptr_t. * typd_mlc.c (GC_typed_mark_proc): Likewise. * backgraph.c [MAKE_BACK_GRAPH] (add_back_edges): Use LOAD_WORD_OR_CONTINUE() instead of direct dereference of current_p. * finalize.c (GC_ignore_self_finalize_mark_proc): Likewise. * mark.c [WRAP_MARK_SOME && PARALLEL_MARK] (GC_push_conditional_eager): Likewise. * typd_mlc.c (GC_typed_mark_proc): Likewise. * finalize.c (GC_ignore_self_finalize_mark_proc): Rename q and r local variables to current_p and q, respectively.
Diffstat (limited to 'mark.c')
-rw-r--r--mark.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mark.c b/mark.c
index a743ba16..80dc2aaa 100644
--- a/mark.c
+++ b/mark.c
@@ -1626,8 +1626,9 @@ GC_INNER void GC_push_all_stack(ptr_t bottom, ptr_t top)
lim = (word *)(((word)top) & ~(ALIGNMENT-1)) - 1;
for (current_p = (ptr_t)(((word)bottom + ALIGNMENT-1) & ~(ALIGNMENT-1));
(word)current_p <= (word)lim; current_p += ALIGNMENT) {
- REGISTER word q = *(word *)current_p;
+ REGISTER word q;
+ LOAD_WORD_OR_CONTINUE(q, current_p);
GC_PUSH_ONE_HEAP(q, current_p, GC_mark_stack_top);
}
# undef GC_greatest_plausible_heap_addr