diff options
| author | Matt Valentine-House <matt@eightbitraptor.com> | 2024-10-02 19:49:16 +0100 |
|---|---|---|
| committer | Matt Valentine-House <matt@eightbitraptor.com> | 2024-10-02 20:43:35 +0100 |
| commit | d3e2d23c60ce4a91ff402aaac36b1072962f632d (patch) | |
| tree | 2adc4e9315f7a79af387c7d26b2ded723d6ab2fc | |
| parent | e7cf2e76398fb226bf87a80ca72599e0b621f668 (diff) | |
Fix compilation when RGENGC_CHECK_MODE >= 4
the mark_function_data callback was moved from the ractor to the VM.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11770
| -rw-r--r-- | gc/default.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gc/default.c b/gc/default.c index e1f30f1067..81e49c3171 100644 --- a/gc/default.c +++ b/gc/default.c @@ -4832,10 +4832,10 @@ allrefs_roots_i(VALUE obj, void *ptr) } } #define PUSH_MARK_FUNC_DATA(v) do { \ - struct gc_mark_func_data_struct *prev_mark_func_data = GET_RACTOR()->mfd; \ - GET_RACTOR()->mfd = (v); + struct gc_mark_func_data_struct *prev_mark_func_data = GET_VM()->gc.mark_func_data; \ + GET_VM()->gc.mark_func_data = (v); -#define POP_MARK_FUNC_DATA() GET_RACTOR()->mfd = prev_mark_func_data;} while (0) +#define POP_MARK_FUNC_DATA() GET_VM()->gc.mark_func_data = prev_mark_func_data;} while (0) static st_table * objspace_allrefs(rb_objspace_t *objspace) @@ -4855,7 +4855,7 @@ objspace_allrefs(rb_objspace_t *objspace) /* traverse root objects */ PUSH_MARK_FUNC_DATA(&mfd); - GET_RACTOR()->mfd = &mfd; + GET_VM()->gc.mark_func_data = &mfd; mark_roots(objspace, &data.category); POP_MARK_FUNC_DATA(); @@ -4913,7 +4913,7 @@ gc_check_after_marks_i(st_data_t k, st_data_t v, st_data_t ptr) rb_objspace_t *objspace = (rb_objspace_t *)ptr; /* object should be marked or oldgen */ - if (!RVALUE_MARKED(obj)) { + if (!RVALUE_MARKED(objspace, obj)) { fprintf(stderr, "gc_check_after_marks_i: %s is not marked and not oldgen.\n", rb_obj_info(obj)); fprintf(stderr, "gc_check_after_marks_i: %p is referred from ", (void *)obj); reflist_dump(refs); |
