diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-01-12 11:12:47 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-01-12 20:57:14 +0300 |
commit | 9b4ac36d4af28cc8a050152ec0df8cbcee1ff56e (patch) | |
tree | fd40e2e06198d2b1fe75b0e91eb5dc75abe6e0cf /mark.c | |
parent | 7797312145631f10fa39e5ca9ef50170e0dc5076 (diff) | |
download | bdwgc-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |