mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Update vm->self location and mark it in vm.c for consistency
This commit is contained in:
parent
b1410c1c75
commit
50c6bd47ef
Notes:
git
2025-06-17 01:08:04 +00:00
2 changed files with 3 additions and 1 deletions
1
gc.c
1
gc.c
|
@ -3060,7 +3060,6 @@ rb_gc_mark_roots(void *objspace, const char **categoryp)
|
||||||
|
|
||||||
MARK_CHECKPOINT("vm");
|
MARK_CHECKPOINT("vm");
|
||||||
rb_vm_mark(vm);
|
rb_vm_mark(vm);
|
||||||
if (vm->self) gc_mark_internal(vm->self);
|
|
||||||
|
|
||||||
MARK_CHECKPOINT("end_proc");
|
MARK_CHECKPOINT("end_proc");
|
||||||
rb_mark_end_proc();
|
rb_mark_end_proc();
|
||||||
|
|
3
vm.c
3
vm.c
|
@ -2982,6 +2982,7 @@ rb_vm_update_references(void *ptr)
|
||||||
if (ptr) {
|
if (ptr) {
|
||||||
rb_vm_t *vm = ptr;
|
rb_vm_t *vm = ptr;
|
||||||
|
|
||||||
|
vm->self = rb_gc_location(vm->self);
|
||||||
vm->mark_object_ary = rb_gc_location(vm->mark_object_ary);
|
vm->mark_object_ary = rb_gc_location(vm->mark_object_ary);
|
||||||
vm->load_path = rb_gc_location(vm->load_path);
|
vm->load_path = rb_gc_location(vm->load_path);
|
||||||
vm->load_path_snapshot = rb_gc_location(vm->load_path_snapshot);
|
vm->load_path_snapshot = rb_gc_location(vm->load_path_snapshot);
|
||||||
|
@ -3068,6 +3069,8 @@ rb_vm_mark(void *ptr)
|
||||||
rb_gc_mark_maybe(*list->varptr);
|
rb_gc_mark_maybe(*list->varptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rb_gc_mark_movable(vm->self);
|
||||||
|
|
||||||
if (vm->main_namespace) {
|
if (vm->main_namespace) {
|
||||||
rb_namespace_entry_mark((void *)vm->main_namespace);
|
rb_namespace_entry_mark((void *)vm->main_namespace);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue