Skip to content
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

undef rb_vm_lookup_overloaded_cme() #5327

Merged
merged 1 commit into from Dec 23, 2021

Conversation

ko1
Copy link
Contributor

@ko1 ko1 commented Dec 23, 2021

Some callable method entries (cme) can be a key of overloaded_cme_table
and the keys should be pinned because the table is numtable (VALUE is a key).
Before the patch GC checks the cme is in overloaded_cme_table by looking up
the table, but it needs VM locking.

It works well in normal GC marking because it is protected by the VM lock,
but it doesn't work on rb_objspace_reachable_objects_from because it doesn't
use VM lock.

Now, the number of target cmes are small enough, I decide to pin down
all possible cmes instead of using looking up the table.

Some callable method entries (cme) can be a key of `overloaded_cme_table`
and the keys should be pinned because the table is numtable (VALUE is a key).
Before the patch GC checks the cme is in `overloaded_cme_table` by looking up
the table, but it needs VM locking.

It works well in normal GC marking because it is protected by the VM lock,
but it doesn't work on `rb_objspace_reachable_objects_from` because it doesn't
use VM lock.

Now, the number of target cmes are small enough, I decide to pin down
all possible cmes instead of using looking up the table.
@ko1
Copy link
Contributor Author

ko1 commented Dec 23, 2021

This issue is pointed by @XrXr.

@ko1 ko1 merged commit ca032d5 into ruby:master Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant