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

Skip to content

Conversation

XrXr
Copy link
Member

@XrXr XrXr commented Sep 23, 2025

The validation is relevant only for traceable userland ruby objects ruby code could interact with. ZJIT's use of rb_vm_method_cfunc_is() allocates a CC imemo and was failing this validation when it was actually fine. Relax the check.

@matzbot matzbot requested a review from a team September 23, 2025 02:25
@XrXr XrXr changed the title gc_validate_pc(): Exclude imemos, add a test and hint in assert message gc_validate_pc(): Exclude imemos; add a test and a hint in assert message Sep 23, 2025
@tekknolagi
Copy link
Contributor

I would also like to change the ZJIT optimizer to not allocate at compile-time. What is the best replacement method?

@XrXr
Copy link
Member Author

XrXr commented Sep 23, 2025

In this case the allocation was happening at runtime though, through Insn::IsMethodCfunc as part of opt_new.

But all lookup methods do caching in some way so all allocate. We kind of just have to deal with it unless we want to move out of using CMEs wholesale, not realistic.

The validation is relevant only for traceable userland ruby objects ruby
code could interact with. ZJIT's use of rb_vm_method_cfunc_is()
allocates a CC imemo and was failing this validation when it was
actually fine. Relax the check.
Copy link

launchable-app bot commented Sep 23, 2025

Tests Failed

✖️no tests failed ✔️62248 tests passed(3 flakes)

Copy link
Member

@k0kubun k0kubun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🙏

@XrXr XrXr merged commit 9a5e48f into ruby:master Sep 23, 2025
94 of 96 checks passed
@XrXr XrXr deleted the gc-validate-pc branch September 23, 2025 16:13
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.

3 participants