Skip to content

Commit

Permalink
Fix ephemeron-adoption problem in mark-delay (#3332)
Browse files Browse the repository at this point in the history
Fix ephemeron-adoption problem found when upstreaming mark-delay to ocaml/ocaml#13580.

Co-authored-by: Stephen Dolan <sdolan@janestreet.com>
  • Loading branch information
NickBarnes and stedolan authored Dec 3, 2024
1 parent eee3040 commit 7e20367
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions runtime/major_gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1410,13 +1410,14 @@ void caml_mark_roots_stw (int participant_count, caml_domain_state** barrier_par
Caml_global_barrier_if_final(participant_count) {
caml_gc_phase = Phase_sweep_and_mark_main;
atomic_store_relaxed(&global_roots_scanned, WORK_UNSTARTED);
/* Adopt orphaned work from domains that were spawned and
terminated in the previous cycle. Do this in the barrier,
before any domain can terminate on this cycle. */
adopt_orphaned_work (caml_global_heap_state.UNMARKED);
}

caml_domain_state* domain = Caml_state;

/* Adopt orphaned work from domains that were spawned and terminated in the
previous cycle. */
adopt_orphaned_work (caml_global_heap_state.UNMARKED);

begin_ephe_marking();

Expand Down

0 comments on commit 7e20367

Please sign in to comment.