Skip to content

Fix missing write barrier in rb_vm_rewrite_cref #13668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jhawthorn
Copy link
Member

If we flatten the operation this is doing it would look like:

cref_a = allocate_cref();
cref_b = allocate_cref(); // cref_a _could_ be incrementally marked here
cref_a->next = cref_b;    // cref_a gains a reference to cref_b

I refactored rb_vm_rewrite_cref to return the new cref rather than assigning it through an output pointer parameter, since I needed to keep a reference anyways for the write barrier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant