Skip to content

Commit

Permalink
Fix btest crashes
Browse files Browse the repository at this point in the history
- make sure upcalls are configured
- add Finalizer job to the Prepare stage, rather than VMRefClosure
  • Loading branch information
eightbitraptor committed Oct 7, 2024
1 parent ace1bc7 commit 52e4bfb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions gc/mmtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ rb_mmtk_global_tables_count(void)
static void
rb_mmtk_update_global_tables(int tbl_idx)
{

rb_gc_vm_weak_tbl_iter(rb_mmtk_update_table_i, NULL, NULL, tbl_idx);
}

Expand All @@ -389,8 +388,8 @@ MMTk_RubyUpcalls ruby_upcalls = {
rb_mmtk_update_global_tables,
rb_mmtk_global_tables_count,
NULL,
NULL,
NULL,
rb_mmtk_update_finalizer_table,
rb_mmtk_update_obj_id_tables,
NULL,
NULL,
NULL,
Expand Down
3 changes: 2 additions & 1 deletion gc/mmtk/src/weak_proc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ impl WeakProcessor {
) {
worker.add_work(WorkBucketStage::VMRefClosure, ProcessObjFreeCandidates);
worker.add_work(WorkBucketStage::VMRefClosure, ProcessWeakReferences);
worker.add_work(WorkBucketStage::VMRefClosure, UpdateFinalizerObjIdTables);

worker.add_work(WorkBucketStage::Prepare, UpdateFinalizerObjIdTables);

let global_tables_count = (crate::upcalls().global_tables_count)();
let work_packets = (0..(global_tables_count - 1))
Expand Down

0 comments on commit 52e4bfb

Please sign in to comment.