Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix calling symbol proc from using scope outside #13230

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 2 commits into
base: master
Choose a base branch
from

Conversation

XrXr
Copy link
Member

@XrXr XrXr commented May 1, 2025

Previously, resolve_refined_method() wrote to defined_class_ptr by using
rb_method_entry_t::defined_class, which by definition can be 0. Since
*defined_class_ptr is used as a back-up when
rb_method_entry_t::defined_class is 0, this wasn't a good strategy to
not have 0 at the end. This caused a crash since it overwrote a properly
set defined_class put by a search_method* function earlier.

Since resolve_refined_method() is always called after calling a
search_method_* function which writes through defined_class_ptr already,
just don't write through deinfed_class_ptr.

[Bug #21265]

Previously, resolve_refined_method() wrote to defined_class_ptr by using
rb_method_entry_t::defined_class, which by definition can be 0. Since
`*defined_class_ptr` is used as a back-up when
rb_method_entry_t::defined_class is 0, this wasn't a good strategy to
not have 0 at the end. This caused a crash since it overwrote a properly
set defined_class put by a `search_method*` function earlier.

Since resolve_refined_method() is always called after calling a
`search_method_*` function which writes through defined_class_ptr already,
just don't write through deinfed_class_ptr.

[Bug #21265]

This comment has been minimized.

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