Revert ivar Java fields to fix remaining issues#7146
Merged
headius merged 2 commits intojruby:jruby-9.3from Mar 17, 2022
Merged
Revert ivar Java fields to fix remaining issues#7146headius merged 2 commits intojruby:jruby-9.3from
headius merged 2 commits intojruby:jruby-9.3from
Conversation
This reverts commit 5ab3da2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Temporarily reverting this PR and a follow-up commit due to problems with object_id handling (I think).
The ivar work by @byteit101 introduced an unexpected regression into the handling of frozen strings which I believe is due to breakage in how lazily-calculated object IDs are handled. The regression led to many failures in rubyspec and CRuby tests that depend on frozen string deduplication.
The issue seems to stem from our special treatment of object_id as not being a normal instance variable. Specifically, object_id is calculated lazily but atomically, so we do not consider it part of the instance variable table for a given class. The changes in #7012 seem to have broken this special treatment, causing object_id values to appear to be instance variables, which in turn leads our string deduplication logic to reject these objects and create new strings.
This was not caught before merging because for whatever reason CI was not running on #7012.
We will revisit the same commits in another PR and resolve this remaining issue before merging.