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

YJIT: Fix incomplete invalidation from opt_setinlinecache #5221

Merged
merged 1 commit into from
Dec 7, 2021

Commits on Dec 6, 2021

  1. YJIT: Fix incomplete invalidation from opt_setinlinecache

    As part of YJIT's strategy for promoting Ruby constant expressions into
    constants in the output native code, the interpreter calls
    rb_yjit_constant_ic_update() from opt_setinlinecache.
    
    The block invalidation loop indirectly calls rb_darray_remove_unordered(),
    which does a shuffle remove. Because of this, looping with an
    incrementing counter like done previously can miss some elements in the
    array. Repeatedly invalidate the first element instead.
    
    The bug this commit resolves does not seem to cause crashes or divergent
    behaviors.
    
    Co-authored-by: Jemma Issroff <jemmaissroff@gmail.com>
    XrXr and jemmaissroff committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    a708b92 View commit details
    Browse the repository at this point in the history