Skip to content

Commit

Permalink
Use lock when verifying marking in shared reference tables
Browse files Browse the repository at this point in the history
  • Loading branch information
rm155 committed Nov 27, 2023
1 parent b88de0d commit 6a4460a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8878,7 +8878,9 @@ static bool
shared_references_all_marked(rb_objspace_t *objspace)
{
bool all_marked = true;
rb_native_mutex_lock(&objspace->shared_reference_tbl_lock);
st_foreach(objspace->shared_reference_tbl, shared_references_all_marked_i, (st_data_t)&all_marked);
rb_native_mutex_unlock(&objspace->shared_reference_tbl_lock);
return all_marked;
}

Expand Down

0 comments on commit 6a4460a

Please sign in to comment.